{"id":12584,"date":"2020-09-02T15:28:52","date_gmt":"2020-09-02T15:28:52","guid":{"rendered":"https:\/\/www.mageworx.com\/blog\/?p=12584"},"modified":"2021-10-25T10:53:39","modified_gmt":"2021-10-25T10:53:39","slug":"how-to-calculate-product-price-based-on-custom-dimensions-in-magento-2","status":"publish","type":"post","link":"https:\/\/www.mageworx.com\/blog\/how-to-calculate-product-price-based-on-custom-dimensions-in-magento-2","title":{"rendered":"How to Calculate Product Price Based on Custom Dimensions in Magento 2"},"content":{"rendered":"\n<!-- SEO Ultimate (http:\/\/www.seodesignsolutions.com\/wordpress-seo\/) - Code Inserter module -->\n<!-- Google Tag Manager (noscript) -->\r\n<noscript><iframe src=\"https:\/\/www.googletagmanager.com\/ns.html?id=GTM-5DTCW7B8\"\r\nheight=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"><\/iframe><\/noscript>\r\n<!-- End Google Tag Manager (noscript) -->\n<!-- \/SEO Ultimate -->\n\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p>Fabric, washable floor covering, chipboard&#8230; 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. <br><\/p>\n\n\n\n<p>And now,<br><\/p>\n\n\n\n<p>The Mageworx <a href=\"https:\/\/www.mageworx.com\/magento-2-advanced-product-options-suite.html\">Advanced Product Options<\/a> extension offers such functionality and allows calculating the final price based on the sizes specified by the customers.<br><\/p>\n\n\n\n<p>Let\u2019s see how it works.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/UK2TlS5WDIzQPEpklpKsB0pAaXG8VgjrkozojHfni9oeoOFe0S4d4cHULHfULWZec1FuCP3036m3TdlFQhPtFtxAtbRWG_4G63deWQChbf3vSQAdxuTmAbdrdRdX1mdGJ33u4Pk_\" alt=\"Product Options with Custom Dimensions in Magento 2 | Mageworx Blog\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to Add \u2018Calculate Prices Based on Custom Sizes\u2019 in Magento 2<\/h2>\n\n\n\n<p>Our extension can use the native options to transform them into dynamic ones and thus allowing you to cover this case.\u00a0<br><\/p>\n\n\n\n<p>To begin with,<strong> <\/strong>create custom options of the text field type for your product. The number of text options depends on your requirements.<\/p>\n\n\n\n<p>If you need to add a line measurement (such as length), one text option only will be required.<\/p>\n\n\n\n<p>If you need to calculate the price based on the <em>width x length<\/em>, you will need to create two text options, etc.<br><\/p>\n\n\n\n<p>Once you add text options, you will be able to select them in the <strong>Mageworx Dynamic Options<\/strong> tab:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/azBlxVBsX2O3GrjjucgsLobMjXMQn61x8CJY5NpU0IAu33j5wPnxXwBOnaPtF6gKLkvikPbq-rFUODLwi4ChYlDdoAEy8CMQNoHKKGIy2YMyZguYT-gSz5A7G7gXayfc_bJ9ThAH\" alt=\"Product Options with Custom Dimensions in Magento 2 | Mageworx Blog\"\/><\/figure>\n\n\n\n<p>For each option, you can set the min\/max values and the allowed step for these values.<br><\/p>\n\n\n\n<p><strong>Price per Unit <\/strong>is the price per 1 measurement unit.<br><\/p>\n\n\n\n<p>At the bottom of this section, you see the formula, i.e., how the price will be calculated.<br><\/p>\n\n\n\n<p>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.<br><\/p>\n\n\n\n<p>The dynamic options look like the native options and have no compatibility issues with the custom themes:<br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/4aKkQhbCyqtgbjdOEbCe_JVucZ3IEBcRmZXSuJRDiAhlcKTwzJQAczynbrjKDjTR6YBBSIoDMG1eZPTrW1mStEsFJWm1KPNr4JDU7dtyqYcakAO3je23gBqhNTYs8-WFbxsmJxIX\" alt=\"Product Options with Custom Dimensions in Magento 2 | Mageworx Blog\"\/><\/figure><\/div>\n\n\n\n<p>Thus, this functionality allows you to calculate the price based on the custom:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Line<\/li><li>Square<\/li><li>Volume, and<\/li><li>Other measurement units<\/li><\/ul>\n\n\n\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link has-luminous-vivid-orange-background-color has-background\" href=\"https:\/\/www.mageworx.com\/magento-2-advanced-product-options-suite.html\">Explore Advanced Product Options<\/a><\/div>\n\n\n<p><a href=\"https:\/\/calendly.com\/kate-volchock\/demo\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15059 size-full\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2021\/02\/live-demo-1.png\" alt=\"Book a Live Demo with Mageworx\" width=\"690\" height=\"260\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2021\/02\/live-demo-1.png 690w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2021\/02\/live-demo-1-600x226.png 600w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2021\/02\/live-demo-1-250x94.png 250w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>Fabric, washable floor covering, chipboard&#8230; 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 [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":12585,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[255,425,194],"tags":[379],"class_list":{"0":"post-12584","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-magento-2","8":"category-magento-how-tos","9":"category-company-news","10":"tag-apo"},"_links":{"self":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/12584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/comments?post=12584"}],"version-history":[{"count":4,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/12584\/revisions"}],"predecessor-version":[{"id":15084,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/12584\/revisions\/15084"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/media\/12585"}],"wp:attachment":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/media?parent=12584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/categories?post=12584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/tags?post=12584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}