How to Set Price Per Unit in Magento 2? [Base Price]

If you sell products based on length, meterage, volume or weight, you must have heard about the Unit Price Directive required for businesses in the EU. It requires merchants to provide accurate and clear pricing. So, if you want to do that in Magento, you need the Magento 2 Base Price Extension.

In this guide, you'll learn how to add the base price in Magento. Basically, you just need to complete three steps.

Step 1: Create Measurement Units

Navigate to Stores > Configuration > Magefan Extensions > Base Price and find the Units grid in the General section. That's where you can edit or add your custom units.

Simply specify a Name, Reference Unit, Reference Amount and set the Rate at which to convert the units.

price units in magento 2

e.g. in the first unit on the image, it's set that there are 1000 (Rate) grams (Name) in 1 (Reference Amount) kilogram (Reference Unit).

Step 2: Edit Base Price Templates

In the Display Settings section, you can choose whether to display the base price on all pages or only products — Display The Base Price On. Then, based on the selected option, you can change how the base price is displayed — in the Product Page and Product List Template fields.

price unit templates magento 2

Don't forget to Save the settings once you finish and continue to the next step.

Step 3: Assign Price Unit to Products

To set the price per unit for Magento products, first, navigate to Catalog > Products and start editing a product. Scroll down to the Base Price section.

Once there, choose the Product Unit (the measurement unit of a product) and the Product Amount.

magento 2 base price

e.g. a product has 300 millilitres

Save a product and check the price per unit calculated automatically on the storefront.

base price in magento

If you also choose to display the base price in the product lists, your customers will see it on categories, related products and search pages. This way you not only comply with the required regulations but offer your customer transparent product pricing.