Jump to content

[SOLVED] Values for up and downquantity (in cart...) based on the min QTY for each click!


Recommended Posts

I use




When the user clicks on upQuantity or the downQuantity

the used value should be based on the minal Qty (you can set this value in general info or on the combinations if used...



Min qty = 3pcs

When you click Up, it counts up 3,6,9,12 .....


Not 3,4,5,6...




Would be great if somene have a great solution for this (

maybe in the js cart_summary.


Best regards!



Edited by AndreasAnemyr (see edit history)
Link to comment
Share on other sites

And solution is.... ( I use prestashop



Change the inputfield to readonly="readonly".

Customer would not be able to change it to custom value


Put a new hidden field in yourtheme/shopping-cart-product-line.tpl

<input id="min_{$product.id}_{$productAttributeId}" type="hidden" value"$product.minimal.quantity"


With Jquery you can use this new hidden field to change the "default" qty.

for eht functions downQuantity( ) & upQuantity( )

This is done in the cart-summary.js


This is the simple code how it´s made...

qty = $('#min_'+ productID+'_'+productAttributeId).val( );



Do you need more information. Reply here and i will explain more in details....

Link to comment
Share on other sites

  • 2 months later...

for prestashop 1.5.4

add this line in yourtheme/shopping-cart-product-line.tpl


<input id="min_{$product.id_product}_{$product.id_product_attribute}" type="hidden" value="{$product.minimal_quantity}"/>


add this line in cart_summary.js

var qty=$('#min_'+ productId+'_'+productAttributeId).val();


line 432 for upQuantity( )

line 513 for downQuantity( )

Link to comment
Share on other sites

  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...