How to Calculate Product Price Based on Custom Dimensions in Magento 2

Product Options with Custom Dimensions in Magento 2 | Mageworx Blog

Reading Time: 2 minutes
Price per Unit is the price per 1 measurement unit.
The dynamic options look like the native options and have no compatibility issues with the custom themes:
The extension will take the values entered by the customers on the front-end and multiply them by price per unit. The final total will be added to the main product price.
To begin with, create custom options of the text field type for your product. The number of text options depends on your requirements.

Product Options with Custom Dimensions in Magento 2 | Mageworx Blog

How to Add ‘Calculate Prices Based on Custom Sizes’ in Magento 2

Once you add text options, you will be able to select them in the Mageworx Dynamic Options tab:
And now,
For each option, you can set the min/max values and the allowed step for these values.
Fabric, washable floor covering, chipboard… If you are selling products, which price depends on their dimensions directly, then you know how important it is to let your shoppers specify the required custom sizes and see the final price. Concurrently, it is equally essential to be able to calculate the final product price based on the custom sizes entered by your shoppers on the front-end.
If you need to add a line measurement (such as length), one text option only will be required.

Product Options with Custom Dimensions in Magento 2 | Mageworx Blog

Our extension can use the native options to transform them into dynamic ones and thus allowing you to cover this case. 
Book a Live Demo with Mageworx
If you need to calculate the price based on the width x length, you will need to create two text options, etc.
The Mageworx Advanced Product Options extension offers such functionality and allows calculating the final price based on the sizes specified by the customers.
Let’s see how it works.

Product Options with Custom Dimensions in Magento 2 | Mageworx Blog

Thus, this functionality allows you to calculate the price based on the custom:

  • Line
  • Square
  • Volume, and
  • Other measurement units

At the bottom of this section, you see the formula, i.e., how the price will be calculated.