How to limit product quantity selection to multiples of 3?

Hi guys,

Ive been trying to create a product page template that limits the quantity drop down to multiples of 3. For example I only want to let a customer select 3,6,9,12,15 etc, and no other numbers.

I have created a new product template, and have linked it to a new section. The page is loading as expected but the multiples requirement is NOT working as expected. Below is an extract of the coding from the section:

{{ 'products.product.quantity' | t }}

When I load the page the qty starts on 3 unit, but clicking the + or - button allows you to move 1 unit, I would like this to move 3 units.

Theme - Venture

Thank you.

Try This


1 Like

This works perfectly - Thank you.

BUT when in my shopping cart I can adjust the qty by 1…How do I fix this?

Add default 1 value before loop also if useful please like post


Still the same, see below once in the shopping cart I can increase to 4, on the product page it works perfectly.

Hi

Under section there is section name cart-template.liquid add step=“3” for + and -

Below example is for refrence

-
                
+

Would this not affect all products?

I only want this function specifically for a single product/product template.