Check stock availability by variants in Kentico 12

26 views Asked by At

For a client, we need to hide or not a button to add product in the cart. We need to do it in a transformation. Actually, we use this condition to hide the button and show a text: "IfCompare(Eval("SKUAvailableItems"), 0, false, true)"

It work fine when the product stock is track "ByProduct". But when the stock is track "ByVariant", this condition is always true and the button is always hide.

How can we do this when the stock is track "ByVariant" ?

Thanks for your help

Actually, the result is fine when the track is set to "ByProduct" but not when set "ByVariant". The best thing is to do it in a transformation.

0

There are 0 answers