Version: - integer  


Returns the number of active related products.


The value is generated automatically and is based on the number of active products selected on theRelated tab for a product. 

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


If you only want to show the number of both active and inactive related products, you can use the tag: Ecom:Product.RelatedCount.


Outputting the template tag


Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag


Check if integer has a value

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