Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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.
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?
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:
with both images and the product price.
By the way, that would work for the stock as well.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted