Change Price of Product Based on the width and height that the client will enter

New Member
1 0 0
I've created a new template for our product page.
we're planning to sell wallpaper so the client will enter the width and height then the price will change based on that : 
==> final_price = (height * width * price)
so we added two fields on the product page one for the height and one for the width and we've managed to get the final price calculated,
but unfortunately, we couldn't find a way to get the final price to be the price added to the cart when the user clicks on add to cart (see Attachment 1) 
and you can see the code we've used (see Attachment 2) 
this is what my cart looks like 
this is really important to our business, we'll be glad if you help us.
Thank you.
Reply 1 (1)
Shopify Partner
2920 504 723

Hi @Z_I 

The solution for that is to set a base price per m2 and then modifying the quantity field to act as the multiplier. What that means is changing HxWxPrice to QuantityxPrice where Quantity is set by WxH.

Let me know if that helps!

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help:
- Learn more about us:
- Satisfied with our solutions? Drop a review on Google