Hello,
We would like to implement custom increment quantity for certain products in Dawn Theme i.e., selling in multiples of 5 or 10. We have already implemented it using setting metafields for those products and using them for min, step and value in the main-product.liquid. However, two issues we found are -
- If the stock available for the product is less than the qty selected by the customer, it will add the stock available to the cart, without validating with the increment qty. For example, the stock available is 25 and the customer input 30 for product with an increment qty of 10, then it will add 25 to the cart. What we want to do is to add only in the multiples of 10. Where can we check and control the quantity that’s being added to the cart?
- Current default quantity selector allows the user to type in the number and it conflicts with our increment qty. Even though we set the increment qty to 10, if the user types in a number that’s conflicting with our increment, how can we validate that? Or how can we make it not typeable?