Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hello community partners or developers
Is it possible to create formula for product pricing and show the pricing on product page using meta fields also to track the inventory of the product with the help of meta fields?
Example
There is a product which cost 10 per sq feet and the area needs to be covered is 100 sq feets
Is this possible that a user landing on the website enters area to be covered after which in front end it will show the price total of 100 sq feets
The price of the product variant will be 10 per sqft
Pls note this should be with custom coding or app only just meta fields.
Thanks
Solved! Go to the solution
This is an accepted solution.
Yes it is possible to do this and do it with metafield definitions.
The details of how to do it vary wildly by implementation.
Frontend is the browser side of code, generally javascript, the website code the customer sees or interacts with .
A front-end square footage calculator a very common pattern that can be found online either as examples, codes or tutorials. Though any code would have to be modified to use shopify.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
This is just a frontend square footage calculator that multiplies the value of some arbitrary metafield (example: metafield.cost.sqft) whatever area a customer enters.
Advanced customizations will update values/prices when the variants are changed and make it so customers can 1 click add the total quantity needed to cover the area they entered; and.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @PaulNewton
thanks for your reply. appreciate the same.
what you mean by - front-end square footage calculator
i want the user who comes on the store enters the area example
Width 10ft X Height 12ft and if the price per feet is USD 10 then the amount should show as per the numbers entered and in backend the inventory should also get deducted
OR
for example
if a user enters the qty as 1.10 grams and price per gram is USD 10 then it should show the price of 1.10 grams times 10 and in backend the qty will be reduced as per the qty ordered
is this possible with Meta fields can you please confirm
This is an accepted solution.
Yes it is possible to do this and do it with metafield definitions.
The details of how to do it vary wildly by implementation.
Frontend is the browser side of code, generally javascript, the website code the customer sees or interacts with .
A front-end square footage calculator a very common pattern that can be found online either as examples, codes or tutorials. Though any code would have to be modified to use shopify.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi @PaulNewton
Can you show me an example of a live url where this is implemented only through meta fields and NOT through custom coding in liquid files
Also can you send me a url of the tutorial too pls
Thanks
vinod
Also what you mean by advanced customization ?
And as you stated "
"A front-end square footage calculator a very common pattern that can be found online either as examples, codes or tutorials. Though any code would have to be modified to use shopify."
Do you mean in the liquid code the calculation code needs to be created and added in the form of JS and other codes to be modified in backend of shopify liquid files - correct this is that you mean to say right ?
we do this with a 3rd party app called DynamicProduct Options - https://www.itoris.com/shopify-custom-options-userguide.html - which is fantastic. it does this type of dynamic pricing
got it the link you have given is for magento i wanted for shopify.
i was talking about shopify but found the shopify app too for Dynamic Product Options
That link is for the shopify version. we couldnt sell most of our products without it.
that's ok i am looking for custom code option using shopify meta fields....
not through an app.
Hi @vinods ,
Don't know if you are still looking for this.
Please use below link to preview the implemented feature.
https://kahrs-direct.myshopify.com/products/ash-vaila
Paul Newton's solution is how we do custom product calculators where metafields control pricing and options that need to be sorted and resorted as metafield values change.
This is an example where a product detail page is calculating a custom product type on the fly based on user unput across all product metafields, thresholds and terminators (where data ins out of bounds for the product).
https://quickbar.ca/products/type-5
Hi @FDG_WEB
Saw this but it is not working correctly