Magento 2 Unit Converter: cm and inch, kg and lb with a Switch
SKU: UNITCONVERTER1
- switch between cm and inch as well as kg and lb in the frontend
- attributes are assigned to unit groups
- factors and rounding configurable
- original value stays leading, choice is remembered
Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.
Magento 2 Unit Converter: dimensions and weights in the customer unit
With the Magento 2 unit converter from Mironsoft customers see lengths, widths and weights in the unit they know. A switch toggles between cm and inch and between kg and lb right on the product page. You assign your attributes to unit groups and define factors and decimal places. The stored value stays unchanged, the conversion only happens in the display. The module runs on Alpine.js and needs no extra library.
Switch cm and inch
One click changes all length values on the product page between metric and imperial.
Switch kg and lb
Weights can be shown in kilograms or pounds, if needed also in grams and ounces.
Assign attributes
You decide which product attributes belong to which unit group.
Factors and rounding
Factors and decimal places are configurable per unit so values stay readable.
Original value stays
Your value is still stored and delivered, only the display is converted.
Choice remembered
The selected system stays in the browser and applies to all further products.
Why customers should be able to use a Magento 2 unit converter
Anyone selling internationally knows the problem: a customer from the USA reads 120 centimetres and has to calculate, a customer from Germany reads 47 inches and does not know the measure. Anyone searching for Magento 2 cm to inch conversion or a Magento 2 kg to lb switch wants to avoid this question. Wrong ideas of size lead to returns.
With the Magento 2 unit converter the customer decides in which system to read. You still maintain only one value per attribute. That saves double maintenance, avoids typing errors between two attributes and makes your product pages easier to understand for customers in several countries.
Magento 2 unit converter with a switch on the product page
A switch appears on the product page, for example Metric and Imperial. One click converts all assigned values immediately, without reloading and without a request to the server. This applies to the specification table, the short description and values in configurator options. If you like, both values are shown at the same time, for example 120 cm (47.2 inch).
- Conversion immediately, no reload
- Specification table, short description and options
- Optionally both values side by side
Assign attributes and unit groups cleanly
In the admin you create unit groups, for example length with cm as base and inch as target, and assign attributes: width, height, depth, weight, diameter. The base value must be purely numeric or contain a recognisable unit. Attributes without assignment remain untouched. That regulates clearly what is converted and what is not, and texts such as size M are never touched.
- Unit groups for length, weight and more
- Assignment of single attributes
- Unassigned texts stay untouched
Set factors, decimal places and rounding rules
The standard factors are stored, and you adjust them if needed. For every unit you define the decimal places: inches with one digit, pounds with two. A rounding rule decides whether values are rounded commercially or, for dimensions, to the nearest half inch. A short note such as Converted values are approximations can appear below the table. The original values remain authoritative.
- Decimal places per unit
- Commercial rounding or to half units
- Note text on approximate values
Default system per store view and remembered choice
For the German store the display starts metric, for a US store imperial. The customer can switch at any time, the choice is stored in the browser and applied on the next visit. The switch can be operated by keyboard and is labelled for screen readers. Whether the storage must be named in your cookie statement is for you to review as the shop owner.
- Starting system per store view
- Choice remembered in the browser
- Keyboard operation and labels
Where the Magento 2 unit converter helps in everyday shop work
Typical situations in which the Magento 2 unit converter avoids returns.
Furniture and home
Customers in the USA check width and height in inches, German customers in centimetres. Both read the same page.
Sports and outdoor
Weights of equipment in pounds or kilograms ease the comparison with manufacturer data.
Tools and technology
Diameters and lengths in millimetres or inches help professional customers match existing parts.
International shipping
The English store starts imperial, the German one metric, without two separate data maintenance efforts.
Magento 2 unit converter: comparison without and with the module
The difference to attributes maintained twice.
| Topic | Without module | With Mironsoft Unit Converter |
|---|---|---|
| Data maintenance | Two attributes for cm and inch | One value, conversion in the display |
| Error rate | Typing errors between the values | Factor always the same |
| Customer choice | Not possible | Switch with remembered choice |
| Rounding | Rounded by hand | Rules per unit |
| New markets | Create new attributes | Default system per store view |
How we set up the Magento 2 unit converter for you
The process after you place your order.
Briefing
You tell us attributes, unit groups, target markets and the desired starting system.
Installation
We install the module and set up the Magento 2 unit converter for your store views. Afterwards we test the Magento 2 unit converter with your attributes, specification tables and options.
Factors
We store factors, decimal places and rounding rules to suit your range.
Test
We check switch, remembered choice, specification table and category list in all languages.
Handover
Your team receives an introduction to unit groups, assignment and rounding.
Differences to the specification table
The specification table from Mironsoft presents attributes clearly in groups. The Magento 2 unit converter adds a switch that shows the values in another unit system. Both modules can be combined, and the converted values then appear directly in the table.
The module converts only in the display. Prices, shipping weights and structured data stay on your base value. It runs with Alpine.js in the Hyvä theme without an additional library. You review legal requirements for dimension statements as the shop owner.
No download — personal setup instead
The unit converter is not listed here as a ready-made download file for self-installation. The purchase is a service commission: we get in touch after the purchase, install the module in your shop and agree on attributes, factors and rounding together with you.
Frequently asked questions
Everything important about the Magento 2 unit converter: the switch, attributes, rounding and how the purchase works.
How can I convert cm to inch in Magento 2?
Is the stored value changed?
Which attributes can I convert?
How accurate is the conversion?
Can I set a different starting system per store view?
Is the customer choice remembered?
Do prices or shipping weight change through the conversion?
Does the Magento 2 unit converter work with Hyvä?
How does it differ from the specification table?
Can I download and install the module myself?
Magento 2 Unit Converter – Mironsoft