## Price dependent on custom product's size in Magento 2 |

Magento 2 Extensions |

Written by ITORIS Team, 2017-04-03 |

Do you sell building materials or goods requiring the size be entered by the customer like blinds, doors, windows, etc.? There is no possibility in Magento 2 natively calculate the final price or shipping weight based on the product dimensions. So how businesses like this can handle it in Magento 2? The Price Product Formula module for Magento 2 offers the possibility to apply formulas and conditions based on product options. The extension helps to customize products in a simple way. The final price will depend on the entered data. You can find more detailed information about the extension's features in the User Guide. Let's create a simple product and add custom options. Each option should have the unique SKU to use custom option in a formula. For instance, the product has two options "Height" and "Width", the SKUs of which are "height" and "width" like in the picture. Thus we have our variables {height} and {width}.
After you enter the options' SKUs, find the "Product Price Formula" tab.
After you click button "Add New Formula", a new form appears. The "Price Formulas" provides the following settings:
If "
{height} > 0 && {width} > 0 Please pay attention that the options' SKUs are used as formula variables. The extension allows to show tips on the condition syntax. Click link "
{height} * {width} * 0.3
{height} * {width} * 0.02
if ({width} <= 0 || {len} <= 0) Error = "Width and length should be greater than 0" This is how your Frontend will look like:
The product original price with the fixed dimensions is $280.00 Enter custom dimensions in the fields, and the price will be changed according to the defined conditions and formulas. You are able to create various mathematical formulas and apply them to different customers groups, to multiple products or per product, calculate shipping weight, set limited time offers and create conditional branching. Let customers get what they really want and offer value-added services within the Product Price Formula extension for Magento 2. |