Jump to content

Quantity selector as multiples of minimum quantity


Marcelo4k

Recommended Posts

Hello,
I'm on Prestashop 8.1.7, 'Warehouse' theme.
I would like to modify the product's page code to only select product quantities that are multiples of the product's minimum quantity. Any help would be really appreciated.

Regards,
Marcelo
 

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

  • Marcelo4k changed the title to Quantity selector as multiples of minimum quantity

Well, I was able to accomplish this buy adding

data-step="{$product.minimal_quantity}"

into product-add-to-cart.tpl 'qty' input, and disabling all other means of changing the units (cart side drawer and cart page).

The problem is that the multiplier factor doesn't change if a different combination is selected, the quantity input fields keeps the range according to the first combination loaded in the page.
This issue could be solved if I can trigger an update on the qty field same as the minimum quantity label gets updated when changing combination.
Any help appreciated.

Link to comment
Share on other sites

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...