Hello,
I'm trying to understand when a unit selector will be shown in Swift_ProductAddToCart
- I have a product, with a base unit (each) and a additional unit (box) of 10 bas units
- For each of these units I have setup there to be a stock level > 0
- in Swift_ProductAddToCart "Show unit selector" is checked
Couple of questions:
- How do I get the UnitOptions for the product to be > 0? I can see that @product.UnitOptions.Count is 0, so with this line the selector will not show: if (unitsSelector && product.UnitOptions.Count > 0) {
- What dis this variable do (bit confused because it seems to hav options "disabled" and "hide" : string whenVariantsExist = Model.Item.GetRawValueString("WhenVariantsExist", "hide");
It reads a bit like units are only available if there are no variants, but that would seem strange to me.
Thanks!
Justin