Can we add a stock property for each variant. I have tried adding the stock as a property to the 'Variant' document type. The value does not get saved though.If feasible can we display or update the stock value based on the variant selection in the dropdown. Using Tea Commerce 3.1.0. tks
Yes you can. Just make sure that the propery alias is "stock" and you will be fine.
Maybe take a look at the demo website where you can log in and check the setup: https://demo.teacommerce.net/umbraco
We want to dynamically change the image as well based on the colour of the product. Basically when a variant is selected we want to be able to change a few things on the product page.
There's a few ways to do that, but we usually write all the different images, prices and whatever you have on your individual variant, to the html.
Give the html elements an attribute with the variant id.
Each time a new variant is selected you now just have to find the variant html elements, hide them alle and then show the ones for the selected variant.
Stock for each variant
Can we add a stock property for each variant. I have tried adding the stock as a property to the 'Variant' document type. The value does not get saved though.If feasible can we display or update the stock value based on the variant selection in the dropdown. Using Tea Commerce 3.1.0. tks
Hi Preethi,
Yes you can. Just make sure that the propery alias is "stock" and you will be fine. Maybe take a look at the demo website where you can log in and check the setup: https://demo.teacommerce.net/umbraco
/Rune
Like in your demo site had to add a value to sku. Otherwise the stock value does not get saved. Thanks that worked
Ah, ofcause. Good that is solved. Please mark your answer for others to see.
/Rune
Hi Rune,
There was a second part to my question. Can we display or update the stock value based on the variant selection in the drop down?
Tks
We want to dynamically change the image as well based on the colour of the product. Basically when a variant is selected we want to be able to change a few things on the product page.
There's a few ways to do that, but we usually write all the different images, prices and whatever you have on your individual variant, to the html. Give the html elements an attribute with the variant id. Each time a new variant is selected you now just have to find the variant html elements, hide them alle and then show the ones for the selected variant.
All in all just a little jquery magic.
It is done here: https://www.kitchenone.dk/produkt/ankarsrum-akm-6220-roeremaskine/ with both images and the product price.
/Rune
By the way, that would work for the stock as well.
is working on a reply...