Sell by Weight & Length
Add-on ID: kv_fractional_quantities · Edition: CS-Cart & Multi-Vendor · Latest version: 1.0.0 · Compatible with: CS-Cart & Multi-Vendor 4.17.2 – 4.21.x, PHP 7.4 – 8.3 · Changelog: view
Sell by Weight & Length lets shoppers buy products by a measure: 1.250 kg of cheese, 3.5 m of rope, 2.4 m² of flooring or 0.75 L of olive oil. You choose the sale unit of a product, the quantity step (down to 0.001), a minimum, a maximum and a few preset quantities such as 250 g, 500 g and 1 kg. The product price is the price of one unit, and every cart line is priced to the cent for the exact quantity, with taxes, promotions and quantity discounts.
CS-Cart counts products in whole items only: the quantity field, the cart, the stock and the order lines are integers. Stores that sell by weight or length either create “100 g” products and ask for 13 of them, or round up and refund the difference. This add-on keeps the real quantity on the order, in the stock and on every document, without changing a single core file.
- Decimal quantity field on the product page and in quick view, with the unit next to it, plus/minus buttons that follow the step, keyboard arrows and the line total while typing.
- Preset quantities (for example 250 g, 500 g, 1 kg) as buttons under the field.
- Step, minimum, maximum and default quantity per product, in the sale unit.
- Price per unit: “/ kg” after the price on product pages and lists.
- Exact prices: the line is priced once, to the cent: 1.250 kg × $12.99 = $16.24. Taxes (included or added), catalog and cart promotions, quantity discounts, shipping by weight and currencies all use that line.
- Exact stock: 10 kg in stock, 1.250 kg sold, 8.750 kg left. Canceled orders, returns and edited orders give back exactly what they took.
- Units everywhere: cart, mini cart, checkout, the customer’s order page, the admin order page, the order editor, invoices, packing slips and order e-mails show “1.250 kg × $12.99 / kg”.
- Payment-safe: every line is sent to payment services as “1 × line total”, so PayPal, Stripe and other gateways that only take whole quantities accept the order.
- Import and export columns, REST API fields and decimal quantities in API orders.
- Works with Min/Max Order & Quantity Rules: product rules apply in the sale unit.
- Multi-Vendor: vendors set the units of their own products (optional).
- Full page cache ready (4.21): product pages are the same for every visitor.

Documentation
Section titled “Documentation”| Page | Contents |
|---|---|
| Installation | Requirements, installing, upgrading, uninstalling |
| Configuration | Settings, product settings, units, stock, license |
| Usage | The shopper flow, cart, orders, documents, import/export, API, vendors |
| Developer notes | How quantities are stored, hooks, data model, file map |
| FAQ | Common questions, payments, reports, license |
Compatibility
Section titled “Compatibility”| CS-Cart / Multi-Vendor | 4.17.2 – 4.21.x |
| PHP | 7.2.5 – 8.3 (whatever your CS-Cart version supports) |
| Themes | Responsive, Bright, Nova (4.21, including its add-to-cart stepper) and themes based on them, including the Kavio Labs themes |
| Units | kg, g, lb, oz, m, cm, ft, yd, in, m², ft², L, ml, gal, fl oz |
| Full page cache (4.21) | Supported |
| Ultimate | Product settings are shared like the product; settings per storefront |