I have a requirement to add a quantity box for each product in the list.phtml file and have it only accept multiples of quantity increments. All of our products are sold with quantity increments!!

I've added the box and +- buttons to affect the quantity however I have no idea how to get the Javascript to:

  1. Pull the quantity increment from Magento for each product in the list
  2. Have the +- buttons multiply the quantity increments (eg: 5,10,15,20 etc...)

We are employing Ahead Works' AjaxCartPro extension to add Ajax "add to cart" functions but no matter what I do it's not recognizing the quantity field even if we enter the correct multiplier properly.

Can anyone offer some assistance? Ahead Works declined to help.


An easy way is to go to System -> Configuration -> Catalog -> Inventory -> Enable Qty Increments to Yes and put a value for Qty Increments.

  • That's already been done. What I need to do is then be able to pull the quantity increment value for each product, insert the default value into the quantity box, then have the + / - buttons increment the value in the quantity box by it's multiplier. I also need to make sure the Ajax add to cart passes this value onto the add to cart method.
    – Trevor
    Mar 11 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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