Units FREE PRO
A unit tells StoreCashier how a product is counted: Pieces, Kilogram, Box, Litre… Each product has one unit. The unit decides whether decimal quantities (for example 1.5 kg) are accepted when you enter opening stock.
admin.php?page=storecashier-products&view=units)
Fields#
| Field | What it does | Example / default |
|---|---|---|
| Name * | Full unit name shown in the product editors ("Name (Short)"). | Pieces, Kilogram, Box |
| Short Name * | Short form shown next to quantities. | Pc(s), kg, box |
| Allow decimal quantities | Ticked: quantities like 0.25 are allowed. Unticked: only whole numbers. | Ticked for new units |
| Add as multiple of another unit | Reveals Times base unit (e.g. 12) and Base unit (e.g. Pieces) — "Example: 1 Box = 12 × Pieces." A unit cannot be its own base. | Off |

Buttons: Add (or Update when editing) and Cancel. Name and Short Name are required.
The units table#
Columns: Actions (Edit, Delete), Name, Short Name, Decimal (Yes/No) and Base unit (e.g. "1 Box = 12 Pc(s)" or "—"). Empty list: "No units yet — add Pieces, Kg, Box…".
Delete asks "Delete this unit?". A unit that is still used by any product cannot be deleted — change those products to another unit first.
Where units are used#
- Product editors — the "Unit" field in the Pro editor (with a quick "+" add) and in the WooCommerce box. New products get the Default Unit from Settings → Products & stock.
- Purchases — when the product's unit has larger units defined on top of it, the purchase line offers a unit drop-down next to Quantity (e.g. "Pc(s)" / "Box (× 12)") and converts to the base unit for stock.
- Opening stock screen — whole-number units only accept whole numbers (decimal entries are skipped when saving).
- Opening stock CSV — a decimal quantity for a whole-number unit is rejected: "Row N: Quantity 2.50 has decimals but unit does not allow decimals".
- WooCommerce CSV — the "Unit" column accepts the unit id, short name or full name. See CSV import & export.
- REST API — units are readable through the API.
Units are not converted anywhere else: the POS, sales, transfers, adjustments and returns work in the base unit only (returns show base quantities). The POS quantity box itself accepts decimals for any product; the decimal rule is enforced on opening stock.
Behind the scenes#
Units are stored in the sc_units table. When StoreCashier is activated it creates "Pieces / Pc(s)" (no decimals) and makes it the Default Unit if none is set. The product's unit is stored in the product meta _storecashier_unit and copied to the inventory record.
Permissions#
Viewing: Products & Stock → View. Adding, editing and deleting units: any Products & Stock write right (Add, Edit or Delete).
How to sell loose goods by weight#
- Add a unit: Name "Kilogram", Short Name "kg", tick Allow decimal quantities, click Add.
- Open the product, set Unit = Kilogram (kg), set the price per kg, save.
- Enter opening stock such as 12.5 kg.
- At the POS, change the line quantity to the weighed amount (e.g. 0.75).
Can I rename a unit that products already use?
Yes. Edit it; all products using it show the new name immediately.
Why was my opening quantity of 2.5 not saved?
The product's unit does not allow decimals. Tick "Allow decimal quantities" on the unit or use a whole number.