I want to add quantity box with each product, now the quantity box is only at product detail page. but i want it every where on category page or in any block.


i tried to add the same code which was on detail page, but on clicking add to cart the page gets redirected to cart. which should not be the case, it should fly and get added as per the theme effect.

the theme i am using is mt yoming

  • You should ask the theme provider for support. – mbalparda Jul 28 '14 at 12:27

If you take a look at the page source for your homepage, product are added to your cart via query string

So you would have to

  1. Edit the template to add input text field <input name="product_{$product->getId()}
  2. Modify your add to call function <button type="button" title="Add to Cart " class="button btn-cart" onclick="_addProductAndQtyToCart(url, <?php echo $product->getId()?>)


function _addProductAndQtyToCart(url, p_id){
   input_qty = //get input value by name (product_{p_id})
   setLocation(url + "&qty=" + input_qty)
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.