Ecom:Product.RelatedCount.VisibleInFrontend

Version: - integer  

Summary

Returns the number of active related products.

Settings

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)

Remarks

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

Examples

Outputting the template tag

@GetInteger("Ecom:Product.RelatedCount.VisibleInFrontend")

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

<!--@Ecom:Product.RelatedCount.VisibleInFrontend-->

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)-->