How can I adjust final checkout price using product metafields?

klikpvckopen
Visitor
2 0 1

Hi, 

Is there a way to change te final price in the checkout to the product price times a metafield?

So we sell flooring and the product price is the price per square feet, but we must sell per unit.

And in 1 unit there will be 2.24 square feet.. so i added a app called quantity calculator and that created a metafield where i put the data 2.24 in. But if u now select 5 units it wil be 5 times the normal product price (sq ft price) but it must be.. product price x 2.24 = ... times the quantity.  

 

So can i do that in code  product price | times ( metafield ) in a var or something?

Hope some one can help me. 

Replies 3 (3)

Jason
Shopify Expert
11194 225 2285

No. The price of an item still needs to reflect that variant price (and we'll ignore things like discounts for the moment that do change the price). Metafields are a good place for storing extra context/content so it's cool seeing you make use of them. 

 

If you sell in sq ft can the unit price of the flooring not be added as 2.24? So if the calculation shows I need 10 sq ft than it just adds ten units to the cart. Is there a blocker to that kind of approach? If it is a blocker there are approaches but it won't be something you handle in the theme code and would require more custom dev with the API.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
klikpvckopen
Visitor
2 0 1

Thanks for the information, we don't want to show the product price as the unit price so the price for 2.24m². I know that will solve the issue but it's not custumer friendly to show that price in stead of the m² price. But thank u for the info.

AHAY
Explorer
42 5 10

I wonder if/how you ended up achieving this if at all possible with metafields.

If you find my answer useful please do like/accept it so I feel more motivated to help in my spare time.