Hi, what is the best way to get a list of products based on a variant property - specifically I would like all products that have any variants in stock.
You would fetch all products and then use TC.GetVariants( storeId, product, true ) to get the variants for the products and check their stock.
Your can either make your own Classes to "save" the products and their variants or you could just use GetVariants. In GetVariants Tea Commerce will cache the result, so it will go lightning fast the second time you get variants for the same product.
Get list of products by variant property
Hi, what is the best way to get a list of products based on a variant property - specifically I would like all products that have any variants in stock.
Thanks
Hi Richard,
You would fetch all products and then use TC.GetVariants( storeId, product, true ) to get the variants for the products and check their stock.
Your can either make your own Classes to "save" the products and their variants or you could just use GetVariants. In GetVariants Tea Commerce will cache the result, so it will go lightning fast the second time you get variants for the same product.
/Rune
is working on a reply...