how to add quantity box on product list page in opencart
1. Modify the add to cart function in Catalog/view/javascript/common.js function addToCart(product_id, el) { if ($(el).parent().children(‘input[name=”quantity”]’).val() != ‘undefined’) { quantity = $(el).parent().children(‘input[name=”quantity”]’).val(); } else { quantity = 1; } $.ajax({ url: ‘index.php?route=checkout/cart/update’, type: ‘post’, data: ‘product_id=’ + product_id + ‘&quantity=’ + quantity, 2. modify the product or category list page template file Change this … Read more