Custom Pricing based on size #2396
Replies: 2 comments
-
|
As far as I am aware this is not possible in Shopify out of the box. Some avenues to explore:
|
Beta Was this translation helpful? Give feedback.
-
|
You're hitting the Hardcoded Price wall that Shopify uses for security. Since the backend re-validates the price against the Variant ID during the cart add, your frontend calculations get wiped. In a headless or custom build, the most common pro approach is to use Line Item Properties to pass the dimensions to the cart, but for the actual price shift, most developers end up using a 'Price-Per-Unit' hidden variant or a Draft Order workaround. I’ve been working on Misk Smart Product Options specifically to handle this 'Width x Height' math. It calculates the dynamic price based on user input (like your $5.66 example) and uses a more stable bridge to pass that final cost to the Shopify checkout without it reverting. It saves you from having to build a custom middleware just to protect your dynamic price during the transition from the product page to the cart. If you have your logic ready, you might find it easier to just map those coefficients into a tool like Misk rather than fighting the native Shopify cart validation! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm selling a custom print service where clients are allowed to enter a width and a height, which is multiplied by a coefficient that gives me the final price (width * height * coefficient).
What would be the best approach for such a pricing model?
I have my logic ready on the front end where i can update my selectedVariant (which is the only one), however adding that item to the cart always reverts back to the original shopify pricing since it fetches the variants while adding to the cart too.
I cannot create product variants/options as this is very specific to the sizing that the user enters (i can get any value like $5.66 for example).
Appreciate any input.
Joe
Beta Was this translation helpful? Give feedback.
All reactions