Pack and Unit Pricing for Magento 2

Compatibility
2.4.9
Hyvä theme
Hyvä compatible
AI management (MCP)
No
€61.50
per item
Email to a Friend

Enquire about this product

Description / Pack and Unit Pricing for Magento 2

MAGENTO 2 · PACKAGING · UNIT PRICES

Package and per-item prices. Clear for your customers.

Sales Units and Price Conversion

Do you sell by the carton while customers compare the price of a single item? Do you offer rolls, metres, kilograms or pallets? The Sales Units and Price Conversion module shows the relationship between units and a secondary price calculated from the current Magento price. Customers can compare your offer more easily and understand which unit they are buying.

18 units · 4 display modes · Luma and Hyvä

HOW IT WORKS IN PRACTICE

PLN 96 per package
PLN 8 per item

If a package contains 12 items and costs PLN 96, the module also shows PLN 8 per item. You can highlight the package price, the unit price or both. When the catalog price is per package, a quantity of 1 still means one package, even when PLN 8 per item is displayed as the main price. The example amounts use the same tax context.

1 package = 12 items
Purchase quantity: 1 package.

Match the price display to the way you sell

Show buyers which unit the price refers to and how much the other unit costs. Choose a layout for the store view and override it for an individual product when needed.

Four display modes

  • Units only: the native price with its unit, plus the unit beside the quantity field, without conversion.
  • Package price as the main price: the other unit’s price in the details under the information icon.
  • Unit price as the main price: the package price in the details under the information icon.
  • Both prices visible: the catalog price, the unit relationship and the secondary price without a tooltip.

Set the mode per store view. Individual products can have their own setting. For relationships such as kilogram–gram, the tooltip keeps the catalog price as the main price without treating either unit as packaging.

Units and product configuration

The module provides 18 units: item, module, package, carton, pallet, set, pair, roll, hour, day, metre, square metre, cubic metre, litre, millilitre, kilogram, gram and tonne. For each product, configure the price and quantity unit, units A and B, a positive factor, the price basis, conversion enablement and, optionally, the display mode.

Installation creates default labels in English. Unit labels can be translated per store view; a Polish interface translation is included. Existing translations and product values are preserved.

Display in the storefront

  • Product pages, category listings and search results.
  • Page Builder: product lists and grids, sliders and carousels.
  • Related products and upsells with separate switches.
  • Optional catalog units in supported cart, cart item editing, mini-cart and order summary areas.

The Luma and Hyvä adapters share the same data and conversion engine. Prices come from Magento’s numeric price model, including changes to special prices or tier price thresholds. The module does not extract amounts from HTML text or maintain its own exchange rates.

Quantity and full-package rules

One native Magento quantity unit corresponds to the catalog price unit. The module does not change the ordered quantity, transaction price or stock levels. Below the quantity field, it shows the catalog unit without quantity conversion or a tooltip.

If the catalog price is per item and the display is to include a package of 12, compatible native Magento rules are required: stock management, enabled quantity increments, and the correct minimum and increment. For example, a minimum of 12 and an increment of 12 allow package conversion to be displayed. With a minimum of 1 and increments disabled, the module displays units only. Configure inventory settings in Magento; the module does not write them.

From configuration to the result

01 · Define the units
Set the price and quantity unit, units A and B, and the catalog price basis.

02 · Add the factor
For example: one package contains 12 items. Enable conversion for the product.

03 · Choose the display mode
Show the secondary price in a tooltip or display both prices side by side.

The purchase quantity stays clear

When the catalog price is per package, a quantity of 1 means one package. This also applies when the converted per-item price is shown as the main price.

If the catalog price is per item, full-package ordering must follow Magento’s native minimum quantity and quantity increment settings.

Installation and maintenance

Composer package: kowal/module-unit-pricing. Includes the core Kowal_UnitPricing module and the Kowal_UnitPricingHyva adapter. Requires PHP with the bcmath extension. The module’s storefront display, Hyvä gateway and optional cart areas are disabled by default. After installation, configure the products and enable the relevant areas in the selected store view.

Compatibility and supported products

The module was tested on Magento 2.4.9, PHP 8.3.36, Hyvä 1.5.3 and Page Builder 2.2.7, with the Luma and Hyvä adapters.

Conversion covers simple and virtual products without custom options. Configurable, grouped and bundle products, MSRP and custom types retain their native flow, with no declared conversion support. There is no direct Hyvä Checkout adapter; a custom checkout may require an additional integration point.

Adapt sales units to your store

Ask about implementing the Sales Units module and discuss the units, quantity rules and theme used in your store.

More Information

Purchase information

Before deployment, establish the catalog price unit, quantity rules and theme compatibility. Hyvä adapter included; no direct integration with Hyvä Checkout.

Hyvä theme Hyvä compatible
Theme compatibility Hyvä, Luma / Blank, KOWAL

Questions and Answers

How do I show a price per item when I sell by the pack in Magento 2?

Set the pack and item units, the number of items per pack and the unit used for the catalog price. A pack of 12 priced at PLN 96 displays an equivalent price of PLN 8 per item on the same tax basis. The second price is for reference.

Does showing a unit price change order quantities or stock levels?

No. Magento keeps order quantities in the unit used for the catalog price. If you sell by the pack, a quantity of one means one pack, even when the storefront emphasizes the price per item. Order totals and inventory quantities stay the same.

Can I show both the pack price and the price per item?

Yes. Show both prices together, emphasize either price and put the other in a tooltip, or display unit labels alone. Choose a default for each store view and override it for individual products.

Does unit pricing work with Luma, Hyvä and Page Builder?

The package includes Luma and Hyvä adapters and supports Page Builder product lists, grids, sliders and carousels. The tested setup used Magento 2.4.9, PHP 8.3.36, Hyvä 1.5.3 and Page Builder 2.2.7.

Which Magento product types support unit price conversion?

The extension supports simple and virtual products without custom options. Configurable, grouped, bundle and custom product types, as well as MSRP pricing, use Magento’s standard price display.

Why does my Magento product show a unit label without a converted price?

Check the units, conversion factor and source price. When converting an item price to a pack price, Magento’s quantity rules must match the pack size. For a pack of 12, that can mean enabling stock management and quantity increments, then setting both the minimum quantity and the increment to 12.

Which sales units can I use, and can I translate their labels?

The extension includes 18 units covering pieces, modules, packs, cartons, pallets, sets, pairs, rolls, hours, days, meters, square meters, cubic meters, liters, milliliters, kilograms, grams and metric tons. Unit labels default to English and can be translated for each store view. The interface also includes Polish.

Does the unit price update when a special price or tier price applies?

Yes. The adapter uses Magento’s current numeric price, including special prices and quantity tiers. It follows Magento’s price changes and currency handling.

Does the unit price appear in Hyvä Checkout or a custom checkout?

The package includes an optional order-summary component for Luma checkout. Hyvä Checkout has no dedicated adapter, and a custom cart or checkout may need integration to display the extra unit label.

How do I install the sales units extension for Magento 2?

Install the released package with Composer. Then configure the units, conversion factors and price display settings for the products you sell by pack or by unit.

How do I enable unit pricing for selected products or store views?

Enable price presentation for the store view, then set both units, the conversion factor and the catalog price basis on each eligible product. Cart display is optional and disabled by default. For Hyvä, also enable the bundled adapter and the presentation setting for that store view.

Change Log

0.1.0 — module features

  • Four price display modes and per-product overrides.
  • Catalog unit below the quantity field; no quantity conversion or quantity tooltips.
  • Minimum and increment checks when converting prices in another unit to package prices.
  • Bulk reading of Magento quantity rules.

Other features

  • Luma and Hyvä adapters, Page Builder, related products and upsells.
  • Tooltips supporting focus, click and Escape.
  • Tooltips kept within the viewport and moved outside clipping containers.
  • Dictionary of 18 units, validation and diagnostics.

Integration Configuration

The module does not require an external API or an account with an additional service. It uses Magento’s prices, taxes, currencies and quantity rules.

Luma has its own price-box adapter, while Hyvä uses the included Alpine adapter. A custom cart or checkout may need an integration based on the cart item ID. There is no direct Hyvä Checkout adapter.

Required PHP extension: bcmath. Tested environment: Magento 2.4.9 / PHP 8.3.36 / Hyvä 1.5.3 / Page Builder 2.2.7.

Store-view configuration

Go to Stores → Configuration → Catalog → Sales Units and Price Conversion. Enable display for the selected view, then set the mode and areas. Enable the Hyvä gateway only in views using Hyvä. Enable the cart and order summary separately after checking the integration.

Product example: a package of 12 items

  1. In the Sales Units group, set the price and quantity unit to package.
  2. Unit A: package. Unit B: item. Factor: 12. Catalog price basis: A.
  3. Enable conversion. Set the actual package price in Magento’s native fields.
  4. Choose a mode or inherit it from the store configuration. At PLN 96 per package, the secondary price is PLN 8 per item, and quantity 1 means one package.

When the catalog price is per item

The price and quantity unit must then be item, with the corresponding price basis. For 1 package = 12 items, configure compatible native minimum and increment rules, for example a minimum of 12 and an increment of 12, with stock management and quantity increments enabled. The module checks these rules but does not configure them.

Translations and configuration checks

Translate unit labels for the store views you use. Check the product page, category, search, Page Builder, related products and upsells, price changes, tier price thresholds and correct taxes. Confirm that order quantities and amounts remain consistent with native sales. Any attribute set created after installation must include the module’s eight fields; add them if missing.

Module Installation Instructions

Installation with Composer

Run the commands from the Magento root directory. Before installation, make a backup and check the module in a test environment.

1. Add the Kowal Composer repository

composer config repositories.kowal composer https://repo.kowal.store

2. Configure repository access

After purchase, you will receive your access credentials, the customer email address and license token, by email. They are also available in your customer account after signing in to kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received.

composer config http-basic.repo.kowal.store "TWOJ_EMAIL_KLIENTA" "TWOJ_TOKEN"

3. Install the module with Composer

composer require kowal/module-unit-pricing

This command installs the module from the Kowal Composer repository.

4. Enable the module

php bin/magento module:enable Kowal_UnitPricing

If your store uses Hyvä, use the following command instead to also enable the adapter included in the same package:

php bin/magento module:enable Kowal_UnitPricing Kowal_UnitPricingHyva

5. Apply database updates

php bin/magento setup:upgrade

If your deployment process preserves previously built generated files, you can use the --keep-generated option. This option does not replace the required compilation or asset build.

6. Prepare production assets

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy pl_PL en_US

Adjust the locale list to your store. For Hyvä, also include the asset build process for the theme in use. Follow your store’s production deployment procedure, using maintenance mode or a prepared release.

7. Refresh indexes and cache

php bin/magento indexer:reindex
php bin/magento cache:clean

8. Check the installation and unit dictionaries

php bin/magento module:status Kowal_UnitPricing
php bin/magento unitpricing:check

The diagnostic command only reads data. Store-view settings, product units and examples are available in the module configuration tab.

Press to skip carousel

We found other products you might like!

Write Your Own Review
You're reviewing: Pack and Unit Pricing for Magento 2
Your Rating:
Price
Quality
Support
loader
Loading...

You submitted your review for moderation.

Related Posts

Price per item or per pack? Make sales units clear in Magento 2

Price per item or per pack? Make sales units clear in Magento 2

6 min read 9 views
Do you sell in packs while customers compare the price per item, metre or kilogram? See how Sales Units and Price Conversion makes your Magento 2 offer clearer across Luma, Hyvä and Page Builder.
Read more
Update cookie preferences