Linux 软件免费装
Banner图

Kavio Labs Sell by Measure for WooCommerce

开发者 kaviolabs
更新时间 2026年11月1日 20:50
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

unit price measurement price per unit sell by weight decimal quantity

下载

1.0.1

详情介绍:

Sell cheese by the kilogram, fabric by the meter, flooring by the square meter or paint by the liter. Customers type the amount they need (1.25 kg, 2.6 m, 3.5 m²); the product price is the price of one unit and every total is price × quantity, calculated by WooCommerce itself. Real decimal quantities, end to end. The cart line says 1.25 kg, the order line says 1.25 kg, the stock goes down by 1.25 and the e-mail shows 1.25 kg. There are no hidden "1 piece" lines, so payment gateways, invoices and reports receive the real quantity and unit price. Features How it works
  1. Open a product, tab Sell by measure, choose a sale unit (for example kilogram) and optionally a step, minimum, maximum and default amount.
  2. Enter the price of one unit as the regular price (for example $12.99 for 1 kg).
  3. Set the stock in the same unit in the Inventory tab, for example 125.5.
That's it: customers can now buy 0.75 kg or 2.35 kg, and the cart, checkout, order and stock follow. Full edition This plugin is complete on its own. Stores that need more can use the full edition, Sell by Measure for WooCommerce (sold separately at kaviolabs.com), which adds category defaults, quick-amount buttons, a length × width calculator for area units and five more units (oz, in, yd, gal, fl oz). It reads the product settings made with this plugin, so nothing has to be set up again.

安装:

  1. Install and activate WooCommerce (10.1 or later).
  2. In Plugins > Add New, search for "Kavio Labs Sell by Measure", install and activate it. Or upload the plugin zip in Plugins > Add New > Upload Plugin.
  3. Edit a product, open the Sell by measure tab of the Product data box, choose a sale unit and update the product.
  4. Optional: WooCommerce > Settings > Sell by measure for the display options.

屏幕截图:

  • Cart block: the unit next to the quantity selector and the unit price of the line.
  • Checkout block: order summary with decimal quantities.
  • Order received page: quantity with the unit and the unit price.
  • Product data tab "Sell by measure": sale unit, step, minimum, maximum and default amount.
  • Settings: unit after prices, live total and data removal.

升级注意事项:

1.0.1 Fixes the quantity field showing a decimal comma in some browser languages. 1.0.0 First release.

常见问题:

Does it work with the block Cart and Checkout?

Yes. The step, minimum and maximum are set through WooCommerce's quantity rules, which the classic pages, the Cart and Checkout blocks, the mini cart and the Store API all use. The unit is shown next to the quantity in the cart block and in the order summary.

What happens to the products I sell in whole items?

Nothing. Only products with a sale unit accept decimals. A quantity of 1.5 for any other product is rejected with a clear message, and their quantity fields keep the numeric keyboard on phones.

Which price do I enter?

The price of one unit: for a cheese at $12.99 per kilogram, enter 12.99 with the unit "Kilogram". The cart line for 1.25 kg is then $16.24.

How is the stock kept?

In the sale unit, with up to 4 decimals. Enter for example 125.5 in the Inventory tab. An order of 1.3 kg takes 1.3 from the stock and a cancelled order gives it back.

What about shipping weight?

Enter the weight of one unit in the Shipping tab. WooCommerce multiplies it by the quantity, so 2.5 m of a fabric with 0.3 kg per meter weighs 0.75 kg.

Can customers type a decimal comma?

The quantity field is a number field, so the browser accepts the decimal separator of the visitor's locale and sends a dot. The amount is rounded to your step on the server, and the customer sees a notice when it was adjusted.

Does the plugin send any data anywhere?

No. The plugin makes no external requests and collects no data. The only link to an external website is the "Learn about the full edition" link in its settings screen, which you can dismiss.

What happens to my data when I delete the plugin?

The plugin settings are always removed. Product settings are removed only when "Remove data on uninstall" is on (WooCommerce > Settings > Sell by measure). Orders are never changed: their lines keep the quantity and the unit.

Can I switch to the full edition later?

Yes. Both use the same product settings. When the full edition is active, this plugin stays idle and can be deactivated.

Are there known limitations?

  • While a block checkout is open, WooCommerce reserves stock for the order in whole numbers (a core limitation); the stock reduction of the paid order is exact.
  • WooCommerce Analytics counts "items sold" in whole numbers; revenue is exact.
  • Product grid buttons show "1.25 in cart" without the unit (button text from WooCommerce).

更新日志:

1.0.1 1.0.0