Shoppers propose a price per item; the shop accepts, counters or declines, or rules answer at once. The agreed price is a one-time specific price for that customer's cart.
- PS 9
- PS 8.2
- Classic
- Hummingbird
by Kavio Labs · for PrestaShop 8.2 and 9.x
Sell by weight, length, area or volume on PrestaShop 8.2 and 9.x: amount field with quick amounts and live total, exact decimal stock and real shipping weight. No overrides.
Sell by weight, length, area or volume on PrestaShop 8.2 and 9.x: amount field with quick amounts and live total, exact decimal stock and real shipping weight. No overrides.
PrestaShop 8.2 - 9.x
Sell cheese by the kilogram, fabric by the meter, flooring by the square meter and paint by the liter. Customers enter the amount they need (1.25 kg, 2.40 m), pick a quick amount and see the total while they type. The cart, the checkout, the order, the invoice, the shipping weight and the stock all follow the amount.
| PrestaShop | 8.2.0 – 9.x (tested 8.2.8 and 9.2.0) |
| PHP | as required by your PrestaShop version (8.2: 7.2.5 – 8.1, 9.x: 8.1+); the module itself runs on PHP 7.2.5+ |
| Themes | Classic, Hummingbird and themes built on them |
| Checkout | standard 4-step checkout and the PrestaShop 9.2 one-page checkout |
kvsellbymeasure-1.0.1.zip (kaviolabs.com) or the package from PrestaShop Addons.Command line: php bin/console prestashop:module install kvsellbymeasure.
Set up a product (Catalog > Products > edit > Modules > Sell by Weight & Length > Configure) or a whole category (module Configure page > Category defaults). See Configuration.
Upload the new package the same way (or prestashop:module upgrade kvsellbymeasure). Settings, product units, exact stock and orders are kept.
Module Manager > Sell by Weight & Length > Uninstall removes the settings, the product and category rules, the exact stock and the module tables. Products are sold in whole items again; PrestaShop's stock keeps the rounded-up value. Past orders, invoices and e-mails keep their "Weight: 1.25 kg" text.
Catalog > Products > edit a product > Modules > Sell by Weight & Length > Configure, then Save sell by measure settings (the block saves on its own; the product's Save button is not needed).
| Field | Example | What it does |
|---|---|---|
| Sale unit | Kilogram (kg) | Use the category default (default), Whole items (standard) or one of 15 units. With a unit, the product price is the price of one unit and the product weight is the weight of one unit. |
| Step | 0.05 | Smallest change of the amount (up to 4 decimals). Amounts snap to the step (1.23 kg becomes 1.25 kg). Its decimals are the decimals shown. Empty = 0.01. |
| Minimum | 0.1 | Smallest amount per cart line. Empty = one step. |
| Maximum | 5 | Largest amount per cart line. Empty = no limit. |
| Default amount | 0.5 | Amount in the field when the page opens. Empty = the minimum. |
| Quick amounts | 0.25, 0.5, 1, 2 | Up to 8 buttons ("250 g", "500 g", "1 kg", "2 kg"). With decimal commas use semicolons: 0,25; 0,5; 1. A single 1,5 is read as 1.5. |
| Exact stock | 12.35 | Decimal stock in the sale unit (one field per combination). PrestaShop's own Stocks quantity shows it rounded up (13). |
Combinations use the settings of their product; the price and weight impact of each combination applies per unit.
Module Configure page > Category defaults: the same fields for a whole category. Products set to Use the category default take the rule of their default category, then of its parent categories, then of their other categories. Packs and virtual products are always sold in whole items.
Module Configure page > Storefront:
| Setting | Default | What it does |
|---|---|---|
| Sell by measure on the storefront | on | Main switch for the product page field and the measured add-to-cart |
| Unit after prices | on | "/ kg" after the price on product pages and product lists |
| Quick amount buttons | on | The quick amount buttons on the product page |
| Live total on the product page | on | "Total $14.88 (1.25 kg × $11.90 / kg)" |
Enter the Kavio Labs licence key in the Licence panel. The module checks it once a day from the back office (only the key, the module id, the module version, your shop domains and the PrestaShop version are sent). Without a valid key (after the 14-day start period, or when the key is invalid, revoked or for another domain) the storefront field is switched off and products are sold in whole items again; carts and orders that already hold amounts keep their prices, and the back office is never blocked. Local development addresses (localhost, *.test, private IPs) always work.
The PrestaShop Addons package has no licence panel: it is licensed through your Addons purchase and never connects to our servers.
When stock management is on and the product does not allow orders when out of stock, a customer cannot add more than the exact stock minus what is already in the cart ("Only 1.00 kg left.").
No. It uses PrestaShop hooks and module customizations (the mechanism PrestaShop provides for product customization), so updates of PrestaShop and of other modules are not affected.
PrestaShop stores quantities as whole numbers everywhere (cart, orders, stock). A measured line is one piece of 1.25 kg: the amount is part of the line and its price is the price of 1.25 kg. Two pieces of the same amount show quantity 2.
Yes. Specific prices, catalog price rules and customer group discounts apply to the unit price; an amount discount ("$2 off") counts per unit. Cart rules (vouchers) work on the cart as usual. Quantity-based specific prices count pieces, not kilograms.
PrestaShop computes them as for any product; the module only multiplies the price of one unit by the amount.
The product weight (plus the combination weight impact) is the weight of one unit; the line weight is that × the amount. PrestaShop 9.x stores the customization weight of an order line twice in the order details; the module corrects the stored weight of measured lines after the order is created.
Product lists send customers to the product page (an amount is needed).
It shows the exact stock rounded up (0.4 kg left = 1) so PrestaShop's own availability rules keep working. The exact value is in the module block of the product page.
I see a customization field named Weight in the product's Options tab. The module labels measured lines with a hidden customization field (Weight, Length, Area or Volume). It is not shown to customers. Do not delete it; if you do, the module recreates it.
Yes, the module's settings and tables are removed. Past orders keep the amount text.
More for PrestaShop
Shoppers propose a price per item; the shop accepts, counters or declines, or rules answer at once. The agreed price is a one-time specific price for that customer's cart.
Text and monogram personalization with a live preview on the product image, 12 fonts, fixed or per-character fees and a printable production sheet.