Jump to content

Displaying Combination Quantities on Product Page (with AJAX refresh)

Recommended Posts


I was not able to find a solution for this problem :

I would like to display how many items remaining for each combination. When a combination is choosen, I want to see the remaining quantity for that combination. It must refresh with AJAX when we select another combination. I want the quantity to be displayed just above the "Add to cart" button.

Please explain how to do this, in details please. Which file to modify, etc. I am not an expert in web designing.


Thank you!

Share this post

Link to post
Share on other sites

Are you using 1.6? If so it's not too complex, if you edit product.js (theme folder/js) you can look for the findCombination method, and print out the combination array to see what the quantity value is (it might as well be "quantity", cannot remember off the top of my head), then you can just replace the value in any html block you like, much like it replaces the price

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More