0

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.

http://gayd.yantu.in/

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

closed as off-topic by David Manners, Keyul Shah, Amit Bera, Marius Mar 26 '15 at 11:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about third-party modules are generally off-topic because the scope of functionality and code are not available. For more information, see this meta post/answer." – David Manners, Keyul Shah, Amit Bera, Marius
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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()?>)

Then

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

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