I’ve integrated a custom product configurator via a custom Shopify App on the product page. The configurator has a lot of options that’ll affect the final price.
I’ve already figured out how to add the product to the cart with the Storefront API but it only adds the base variant and its price.
My question is now: Since I can’t know in advance which variants I’ll have (there are just to many options), is there any way I can modify the price of the product in the cart/checkout via the Admin or Storefront APIs?
Or can I create something like dynamic variants?
Hi Wintermilch,
I am facing same issue with my store. Please some tell us a solution for it.
I think I’ve found a solution but an ugly one. Didn’t implement it fully yet.
For every session I create a variant for the product. In this variant I have a meta field (simple text) that tells me that it is a dynamic variant and which cart it belongs to (cart id / token).
Now with the Storefront and Admin API I can update the amount and price of that dynamic variant as I want.
But you need to consider that there can only be 100 variants per product. Also after purchase or ending the session, the dynamic variant needs to be removed to make space for more.