Best way to get quantity of an eCommerce product
Permalink
I need to get the quantity of an eCommerce product for use on a single page (if a certain product is sold out, I'm going to show a notice and maybe disable site registration). Anyone know how to do this? I think I should use this:
but I'm not sure how to set $product.
Thanks!
$product->getProductQuantity()
but I'm not sure how to set $product.
Thanks!

I just figured this out. In case anyone else needs it, here's what I'm using:
Using Magic Data Commerce this snippet could be inserted in to a content block (or many other types of block).
[%SET "Molly Mallard" AS_PRODUCT PRODUCT_QUANTITY%]
[%SET "Molly Mallard" AS_PRODUCT PRODUCT_QUANTITY%]