Goal: sell fabric by the meter with decimal increments (e.g., 1.5 m) on Shopify Basic, but cart/quantity only accepts whole numbers.
Key facts and constraints:
Shopify does not support decimal quantities on any plan. Quantities must be integers.
Decimal-like behavior can be simulated by changing the base unit (e.g., 0.1 m or 0.5 m) so cart quantity 15 = 1.5 m. Themes can display “1.5 m” while sending value 15.
Example site cited uses 0.5 m as the unit; screenshots show 2.5 m appears as quantity 5 in cart/checkout. Images are central to illustrating this mapping.
Proposed solutions:
Variants per length (1 m, 1.5 m, 2 m, …). Manage price/inventory per variant. To change length in cart, custom Liquid is required to switch the line item’s variant (sample
Summarized with AI on December 11.
AI used: gpt-5.
I am creating a fabric store on Shopify.
I need to allow customers to buy fabric in decimal values like 1 meter, 1.5 meters, 2 meters, 2.5 meters, up to 10 meters.
But Shopify only accepts whole numbers (1, 2, 3…) for quantity.
When I try to use decimal values, they do not update in the cart, especially when I’m using a custom cart.
I am using the Basic Shopify plan, so I cannot change the product unit settings or use advanced features.
I want a simple solution to sell fabric by the meter with decimal quantities.
@hardyjoyson Thanks for the feedback. We already used this solution, but it is creating a problem on the cart page. How can I change the meter value on the cart page?Could you explain step by step
Set 10cm as the unit instead of one meter.
People will have to order 10 units instead of 1 to get 1 meter, 100 units instead of 10 to get 10 meters.
Can have some theme edits to hide this, or some calculation like “you’re getting 10 units, which will get you 1 meter”…
The code change will depend on your theme.
Also, if you use drop-down quantity selector, you can make it show 1.5 but the value will be 15.
@tim_1 Please guide me step by step on how to change the quantity in the cart. Additionally, if Shopify plans do not support decimal values, how is it working on this website?
You can handle this using Easify Inventory Sync’s bundle group feature. Simply set up a bundle group for your fabric stock, then link all the different length options (1 m, 1.5 m, 2 m, etc.) to that group. When a customer buys, the corresponding quantity is deducted from the shared bundle group inventory, keeping your stock accurate. Here’s how it works:
1. Set up products: single product for inventory tracking/ 1m variant (with quantity of 20 m for example), other smaller size variants (2m, 3m,…, 10m)
2. Set Up Bundle Groups: Use the app to create Bundle groups that connect your smaller size variant with your single main product (20 m). Here’s how to set up a bundle group for your product:
Master Product: 2m variant
Component Product: Main product with the Quantity per Bundle set to 2
2. Do the same with your other variants (3m, 4m,…)
3. How It Works:
The inventory for your variants will be automatically calculated based on the original main product’s inventory.
When one ‘2m’ variant is purchased, the main inventory will be reduced by 2. The app will then recalculate the available quantities for your size variants based on the updated main product inventory, ensuring accurate inventory tracking.
I hope this answer helps solve the problem. If you need further assistance, feel free to reach out to Easify anytime!