Version: - integer  


Returns the number of variants available for the product.


The value is generated automatically and is based on the number of variants selected on the Variants tab for a product.

(Ecommerce > Product Catalog > Shop > Product group > Product > Variants tab)


Outputting the template tag


Check if tag has a value

@if(!int.IsNullOrWhiteSpace(GetInteger("Ecom:Product.VariantCount"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ int storedTag = GetInteger("Ecom:Product.VariantCount"); }

Outputting the template tag


Check if integer has a value

<!--@If Defined(@Ecom:Product.VariantCount)--> Let's output this tag here: <strong><!--@Ecom:Product.VariantCount--></strong> <!--@EndIf(@Ecom:Product.VariantCount)-->