Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID

Version: - string  

Summary

Returns the ID for the Product category.

Settings

The ID is based on the System name field for the product category.

(Management center > eCommerce settings > Product Catalog > Product categories - Product category - Settings - System name)

Examples

Outputting the template tag

@GetString("Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID"); }

Outputting the template tag

<!--@Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID-->

Check if string has a value

<!--@If Defined(@Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID)--> Let's output this tag here: <strong><!--@Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID--></strong> <!--@EndIf(@Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].CategoryID)-->