How to increment the qty by 0.5 in certain products?

jjguajardo
New Member
2 0 0

Some of the products in my store are sold by the kilo starting with 1 kilo but I need to be able to increment the qty by half kilo, I mean, 1, 1.5, 2, 2.5, 3, 3.5 and so on...

I need this for some products only, the rest of the them can work with the actual behavior 

 

thanks for your comments 

Replies 5 (5)
Propero
Shopify Partner
884 101 155

@jjguajardo ,

Welcome to the Shopify community, it is technically possible. You need to create an alternate product template for a product that needs this custom quantity increment and then specify a step size in quantity selector and write a script that does custom increment/decrement. 

The code would go like this

<input type="number" placeholder="1.0" step="0.5" min="0" max="10">

 

- Was my reply helpful? Click Like or Click Accept as Solution
To hire: email us at shopify@propero.in
checkout our app https://apps.shopify.com/picamaze
Purplechalk
Shopify Partner
2 0 1

I'm facing a similar situation and need to keep the 1st quantity as 1 and incremental quantity by .5 meters 

Can you guide me a little more in detail to solve this please , will be so helpful . 

 

Regards

CreatieWilder
Tourist
10 0 3

Hello! I've added this in and it works on the product page however it isn't updating on the actual cart. It's just rounding it up or down to the whole number. Does a JS snippet need to be added?

lafoi
New Member
1 0 0

Did we get to the solution on this?

Propero
Shopify Partner
884 101 155

So there is no native solution to this because at the core Shopify supports selling in whole numbers only. While you can change the display on PDP and CART page, essentially you will need to convert them to integer quantity to be accepted at checkout.  We usually solve this by selling the items in multiple of lowest fraction which merchant wants to support, for example if you want to sell in increment of 1.25 Kg, 1.5 Kg 1.75 Kgs and so on....so under product admin for 10 Kg we will add 40 X 250 Gms unit so, when a customer buys 1.5 kg they will essentially checkout with 6 times of 250 gms quantity. Hope this helps

- Was my reply helpful? Click Like or Click Accept as Solution
To hire: email us at shopify@propero.in
checkout our app https://apps.shopify.com/picamaze