Guide · Cross-platform

Selling by weight or length, platform by platform.

Cheese by the kilo, fabric by the metre, flooring by the square metre: every platform makes this harder than it looks. Here is why, what the usual workarounds cost you, and how each platform can do it properly.

Why every platform counts whole items

CS-Cart, OpenCart, WooCommerce, PrestaShop and Shopify all store a cart quantity as a whole number. That number drives everything after it: the line price, the stock reduction, the shipping weight, the order, the invoice and what the payment gateway receives.

So "1.25 kg" is not just a field on the product page. If the quantity is still 1 behind the scenes, the price, the stock and the invoice are wrong unless something else carries the real amount.

The three common workarounds

1. One product, option or variant per amount

You sell "250 g", "500 g" and "1 kg" as separate choices. It is simple and works on every platform, but shoppers cannot buy 1.3 kg, the price per kilo is hidden, and stock is split across packs or managed by hand.

2. An extra input field with a price formula

The quantity box is hidden and a custom field asks for the amount; a formula adds a surcharge. The page looks right, but the order line still says "1", stock goes down by one piece, and shipping weight ignores the amount.

3. A real measured quantity

The amount itself drives the line: price per unit × amount, stock reduced by the amount, shipping weight per unit × amount, and the amount printed on the order and invoice. This is the only approach where cart, order and stock agree, but it has to be done carefully on each platform, because each one stores quantities differently.

How each platform can do it properly

CS-Cart and Multi-Vendor

CS-Cart can carry a decimal quantity through cart, checkout and orders when an add-on changes how quantities are validated and priced. Our Sell by Weight & Length add-on adds a quantity field with unit, step (down to 0.001), minimum, maximum and preset buttons, prices lines to the cent and keeps exact stock with a decimal remainder. Payment line items are sent so gateways that accept whole quantities still work.

OpenCart 4 and 3

OpenCart stores whole quantities everywhere and has no event inside the cart library. A clean solution therefore keeps the exact quantity and stock next to OpenCart’s own numbers: our extension shows the order line as quantity 1 with the exact line total, and "Quantity: 1.250 kg" and "Price per kg" underneath, while the Quantity field shows the stock rounded up so the product stays in stock.

WooCommerce

WooCommerce lets a plugin make the quantity itself decimal, including stock in the sale unit (125.5 kg). Our Sell by Measure plugin does that and supports the Cart and Checkout blocks, the Store API and HPOS. Two WooCommerce limits remain: block checkouts hold stock for unpaid orders in whole numbers, and WooCommerce Analytics counts "items sold" as integers (revenue stays exact).

PrestaShop 8.2 and 9

PrestaShop also stores whole numbers in cart, orders and stock. Without overrides, a measured line is best modelled as one piece of 1.25 kg: the amount is part of the line (as a module customization) and its price, weight and stock follow the amount. Our module keeps the exact decimal stock and shows "Weight: 1.25 kg" in cart, checkout (including the 9.2 one-page checkout), e-mails and invoices.

Shopify

Shopify quantities are whole numbers and apps cannot change that. The reliable approach is to sell in steps: with a 10 cm step, 2.5 m is 25 steps, priced by Shopify itself and shown with Shopify’s own unit price ("$12.00 / m"). Our Sell by Measure app adds the amount input, the live price and a checkout rule for minimum and maximum amounts.

Side by side

How a measured line is stored with our products, per platform
PlatformWhat the order line storesStockShipping weight
CS-CartThe decimal quantity (1.250 kg)Exact, with a decimal remainderPer unit × amount
OpenCartQuantity 1 + "Quantity: 1.250 kg" detailExact stock kept next to the core fieldPer unit × amount
WooCommerceThe decimal quantity (1.25)Exact, in the sale unitPer unit × amount
PrestaShopOne piece of 1.25 kg ("Weight: 1.25 kg")Exact stock kept by the modulePer unit × amount
ShopifySteps (25 × 10 cm) with a unit priceCounted in stepsPer step

What to check before you choose

  • Stock: is it reduced by the real amount, and given back when an order is cancelled?
  • Taxes, coupons and discounts: do they apply to the line price exactly as for any other product?
  • Payment gateways: do gateways that only accept whole quantities still receive a valid order?
  • Shipping: does the shipping weight follow the amount?
  • Documents: do the order page, e-mails and invoices show the amount and the unit price?
  • Uninstall: what happens to open orders and stock if you remove the extension?
  • Core edits: does it change core files or use overrides? Those break on upgrades.

Every product below has real screenshots and full documentation (Shopify: a free plan), so you can check these points before you buy.

Products mentioned in this guide

CS-Cart · Sell by Weight & Length

Sell by weight

Decimal quantities with a unit, step, presets and price per kg or metre, with exact stock down to 0.001.

from $129

OpenCart · Sell by Weight & Length

Sell by weight

Decimal quantities in 15 units, preset buttons, a live line total and exact decimal stock, on OpenCart 4 and 3.

$69

WooCommerce · Sell by Measure

Sell by weight

Decimal quantities like 1.25 kg, quick amounts, length × width and exact decimal stock, with the block checkout.

$39

PrestaShop · Sell by Weight & Length

Sell by weight

Amounts like 1.25 kg or 2.40 m with quick amounts, a live total, exact decimal stock and real shipping weight.

$99

Shopify · Sell by Measure

Sell by measure

An amount input with a live price, Shopify unit prices and a checkout check for minimum and maximum amounts.

Free plan

FAQ

Questions and answers

Can I sell by weight without an extension?

Only with workarounds such as one product or variant per pack. None of the five platforms stores decimal quantities on its own.

Which unit should I use: kg or 100 g?

Use the unit customers think in for the price (per kg, per metre) and a step that matches how you cut or weigh (for example 0.05 kg or 10 cm).

Will my payment provider accept 1.25 kg?

With a careful implementation, yes: the gateway receives either the exact line total as one item, or whole steps priced by the platform.

Pick your platform

Every product has its own page with screenshots, documentation and the changelog on the store for your platform.