Compare products by price per unit

Price per unit helps customers compare products sold in different package sizes. For example, a 750 g package costing 12 has a comparison price of 1.60 per 100 g. These amounts describe the product; they do not change its selling price, cart quantities or stock rules.

This guide is for WooCommerce store administrators and product editors using POM Tweaks.

Enable and place the comparison

  1. Open Settings → POM Tweaks → E-Commerce → Products.
  2. Enable Price per unit.
  3. Select Show below the product price to display the comparison automatically in the classic product summary. Alternatively, leave it off and place [price_per_unit] in product content or a template that renders shortcodes. Use one placement to avoid duplicate output.
  4. Optionally select Show in product lists for classic product loops.
  5. Choose a Display format: Package price and unit price or Unit price only.
  6. Click Save.

Automatic placements require the standard WooCommerce product-summary or product-loop hooks. A custom POM Theme card/template must include the corresponding hook if it should show this output. Product Collection blocks do not receive an automatic placement from this setting. The shortcode has no attributes and only produces output on a single product page.

Describe a product's contents

  1. Open Products → All products and edit a product.
  2. Under Product data → General, enter Number of units: the contents of one purchasable product.
  3. Enter Name of the unit, such as kg, g, litre, m² or item.
  4. Set Reference quantity to the amount customers should compare. Leave it empty for 1.
  5. Update the product and view its storefront page.

Use the same unit for the contents and the reference quantity. Unit names are labels, not automatic conversions. Enter positive decimals with a dot or comma and no thousands separators. Clearing the product's contents or unit name removes its comparison. Invalid quantities keep the previous saved value and show an editor notice.

Selling price Number of units Name of the unit Reference quantity Comparison
12 0.75 kg 1 16 per kg
12 750 g 100 1.60 per 100 g
18 6 item 1 3 per item

The calculation uses the current product price, including an active sale price and WooCommerce's storefront tax display for the customer. Formatting follows the active currency. A product with no price, invalid quantity or missing unit name has no comparison. A free product can have a zero unit price. Unit pricing does not reveal numeric prices replaced or hidden by standard WooCommerce price-output integrations.

Configure variations

For a variable product, set shared values under General, then open Variations and expand a variation to override its Number of units, Name of the unit or Reference quantity. Each empty variation field inherits that individual value from the parent product. Click Save changes for the variations.

On the product page, the comparison appears after a variation is selected and updates when the selection changes. Clearing the selection hides it. Variable products do not receive a catalog comparison based on their minimum price, because different variations can have different quantities or units. Grouped products do not receive an aggregate unit price.

With POM Tweaks Composite products, a valid configuration updates the comparison from its calculated storefront amount. The comparison remains per one configured product, regardless of the quantity added to the cart. Other pricing/configurator extensions require their own compatible integration; a cart-only discount does not change the product-page comparison.

Verify and troubleshoot

  • Compare the selling price divided by the contents and multiplied by the reference quantity. Check the selected tax display and customer exemption before comparing amounts.
  • For variations, choose at least two options and confirm that their own quantities or inherited values are used.
  • If nothing appears, check the feature's Enable switch, saved unit fields, product price and selected placement. A variable product needs a selected variation.
  • If a custom card or template shows no comparison, check whether it renders the standard WooCommerce hooks. Enabling the setting does not replace a theme's card layout.
  • If output appears twice, use either the shortcode or the automatic product-summary placement.
  • To stop displaying the comparison and editing its fields, disable Price per unit and save. Existing product values remain stored for re-enabling it later.