Sell by the kilogram, meter, square meter or liter: decimal quantities, exact prices and exact stock.
Available Updated Oct 25, 2026Version 1.0.0CS-Cart, Multi-Vendor 4.17.2 – 4.21.x No core file edits
Built for
Sell by Weight & Length: overview1 of 20
What it does
CS-Cart counts products in whole items, so stores that sell cheese, coffee, fabric, rope, cable or flooring create 100 g products or round up and refund. Sell by Weight & Length adds a decimal quantity field with the unit, a step down to 0.001, minimum, maximum and preset buttons such as 250 g, 500 g, 1 kg. Prices are per unit, and the cart, checkout, orders, invoices and e-mails show the real quantity. No core file is changed.
How it works
Open a product and choose its sale unit (kg, g, lb, m, ft, m², L and more), the step, the limits and the presets. The price of the product becomes the price per unit, shown with "/ kg". Shoppers type 1,25 or tap a preset; the cart merges and corrects quantities and shows "1.250 kg x $12.99 / kg". Orders take the exact stock, cancellations give it back. Import/export columns and REST API fields included; vendors set units for their own products.
Features
Decimal quantity field with unit, step, minimum and maximum
Preset quantity buttons such as 250 g, 500 g and 1 kg
Weight, length, area and volume units
Price per unit with "/ kg" on product pages and lists
Lines priced to the cent with taxes, promotions and quantity discounts
Exact stock with decimal remainder, restored on cancellation and return
Units in cart, mini cart, checkout, orders, invoices and e-mails
Payment line items accepted by gateways with whole quantities
Import/export columns, REST API fields and order editing
Works with Min/Max Order & Quantity Rules, Nova stepper and full page cache
What you get
Package
kv_fractional_quantities-1.0.0.zip, installed through Add-ons → Manage add-ons
Updates & support
12 months included. Download new versions from your account and install them in Add-ons → Manage add-ons or the Upgrade Center.
License
1 production installation. Staging, dev and localhost are free and unlimited. The add-on keeps working after the update period ends. How licensing works
For developers
Uses 12 CS-Cart PHP hooks, and provides 1 hooks of its own. No core files are changed.
Compatibility
We list only the builds we install and test on. “Tested” means the full test plan was run on that build; “Supported” means the build is inside the supported range and uses the same hooks.
CS-Cart version and edition compatibility
CS-Cart version
CS-Cart
CS-Cart Ultimate
Multi-Vendor
Multi-Vendor Ultimate
4.22 and later
Testing next
Testing next
Testing next
Testing next
4.21.2
Supported
Supported
Tested
Supported
4.20.x
Supported
Supported
Supported
Supported
4.19.x
Supported
Supported
Supported
Supported
4.18.x
Supported
Supported
Supported
Supported
4.17.2
Tested
Supported
Tested
Supported
Before 4.17.2
Not supported
Not supported
Not supported
Not supported
Last tested build: Multi-Vendor 4.21.2, Oct 25, 2026Tested on: Multi-Vendor 4.17.2, CS-Cart 4.17.2, Multi-Vendor 4.21.2
Requirements
PHP
CS-Cart or CS-Cart Multi-Vendor 4.17.2 – 4.21.x (tested on CS-Cart Ultimate 4.17.2 with PHP 8.1, Multi-Vendor 4.17.2 with PHP 8.1 and Multi-Vendor 4.21.2 with PHP 8.3)
PHP
PHP 7.2.5 – 8.3 (as supported by your CS-Cart version)
Theme
A theme based on Responsive, Bright or Nova
Requirement
Stock tracking "by product" for products sold by a measure (the default). Tracking by warehouses is not used for these products
Core changes
None. Hooks and template overrides only
1.0.0
Oct 25, 2026
Latest
Added 8
Sale units (weight, length, area, volume) per product with quantity step, minimum, maximum, default and preset quantities.
Decimal quantity field on the product page and in quick view (Nova add-to-cart stepper supported), presets and line total.
Exact line prices to the cent with taxes, catalog and cart promotions, quantity discounts, currencies and shipping weight.
Exact stock with decimal remainder; orders, cancellations, returns and order editing take or give back the exact quantity.
Units in the cart, mini cart, checkout, order pages, order editor, invoices, packing slips and order e-mails.
Import/export columns, REST API fields and decimal quantities in API orders.
Quantity rules of Min/Max Order & Quantity Rules applied in the sale unit.
Multi-Vendor: vendors set the sale units of their own products.
Tested on Multi-Vendor 4.17.2, CS-Cart 4.17.2, Multi-Vendor 4.21.2. First release.
Why does the admin order page show quantity 1?
CS-Cart stores whole quantities only. A product sold by a measure is one order line ("1") that holds the exact quantity: the line shows "Quantity: 1.250 kg × $12.99 / kg" under the product name, and the line total is the exact price. Customer pages, invoices and e-mails show "1.250 kg" in the quantity column.
Are prices exact to the cent?
Yes. The line price is the unit price × the quantity, rounded once: 1.250 kg × $12.99 = $16.24. Taxes, discounts and the order total are computed from that line, the same way as for any other product.
Will PayPal or Stripe accept the order?
Yes. Payment services receive each measured line as quantity 1 with the line total as its price, so the sum of the lines always equals the order total. Gateways that do not accept decimal quantities therefore work without changes.
What do sales reports count?
Core reports that count items count order lines: 1.250 kg is one item. Amounts (revenue, taxes, discounts) are exact.
Can a product be sold by weight and in packs at the same time?
Use two products (or variations), one with a sale unit and one sold in whole items. A product has one sale unit.
Does it work with product options and variations?
Yes. Option modifiers are added to the unit price. Each variation has its own sale unit and stock settings.
What happens to the stock when I change "In stock" by hand?
The number you enter becomes the exact stock (12 → 12.000 kg). To set a fraction, use Exact stock in the product section.
Does it work with warehouses?
Products sold by a measure use the stock of the product. Warehouses (4.21 Multi-Vendor) keep counting whole units for them.
Does it work with full page cache and with my theme?
Yes. Product pages are the same for every visitor. The quantity field uses neutral styles that follow Responsive, Bright, Nova and themes based on them; on Nova the add-to-cart stepper is replaced by the decimal field for these products.
What happens if the license lapses?
Without a valid license (no key after the 14-day start period, an invalid or revoked key, a domain the license does not cover, or no successful check for 14 days), products are sold in whole units again: the decimal quantity field and the preset buttons are hidden and no new decimal quantities are accepted. Carts and orders that already hold a decimal quantity keep their exact quantity, price and stock handling. Once the license is valid again, everything works again.
The admin panel shows a license notice.
Open Add-ons → Manage add-ons → Sell by Weight & Length → Settings → License. The status line says what is wrong: no key, a key for another add-on, a revoked license, or a domain that the license does not cover. Fix it and click Check now. See License.
Does the add-on work on my staging copy?
Yes. Subdomains of your licensed domain (for example staging.yourstore.com) and local development hosts (localhost, private IP addresses, .local, .test) are covered by the same license.
Does the license check slow down my storefront or checkout?
No. The check runs in the admin panel or from cron, once a day. The storefront never runs it.