kowal.info

Sales Units and Price Conversion

Composer kowal/module-unit-pricing · Version 0.2.3

Product page

Sales Units and Price Conversion — kowal.co

Description

Show the catalog price unit and convert the price to a second unit, such as a piece price and a pack price. Cart quantity stays in the catalog price unit.

For whom

For stores selling packs where shoppers need to compare the cost of one piece with the price of a full pack.

Features

  • Display both prices together or show the secondary price in a tooltip.
  • Choose placements including product pages, listings and the cart.
  • Override the presentation mode on an individual product.

Installation

From the Magento root, with Composer access to the Kowal package, run

composer require kowal/module-unit-pricing
bin/magento module:enable Kowal_UnitPricing
bin/magento setup:upgrade
bin/magento cache:clean

Configuration

  1. Enable Enable Sales Units under Stores → Configuration → Catalog → Sales Units and Price Conversion and choose the placements. For Hyvä, also check Enable Hyva Presentation.
  2. Set the catalog price unit, secondary unit and conversion factor on the product. For a 12-piece pack priced per piece, configure whole-pack sales, for example a minimum of 12 and an increment of 12.
  3. Select the two-price mode under Unit Price Presentation to make the conversion easy to inspect. Save the product and store-view settings.

Requirements / notes

Version 0.2.3 requires PHP matching ^8.1 and the bcmath extension. Magento quantity settings must support the declared pack increments.

FAQ

Why can I see the piece price but no pack price?

For a catalog price per piece, check the pack size, minimum quantity and enabled quantity increment. With a pack of 12, settings that allow single-piece purchases disable the pack conversion.

Verify the installation

bin/magento module:status Kowal_UnitPricing

Run the read-only check bin/magento unitpricing:check. At €5 per piece, a pack of 12 should display €60 on the same tax basis. Add 12 pieces and compare the cart line amount.

Components included in Sales Units and Price Conversion