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

1
  • You should ask the theme provider for support.
    – mbalparda
    Commented Jul 28, 2014 at 12:27

1 Answer 1

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.