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

Version: - string  

Summary

Returns the value of the product category field option that is selected by default.

Settings

The value is based on the Value field for the option where the default checkbox is enabled.

(Management center > eCommerce settings > Product Catalog > Product categories - Product category - Fields- Edit list box field - Options - Value)

Remarks

It's only List box fields with options that renders a value in this tag (e.g. Radiobutton list or Checkbox list).

Note that only one Default checkbox can be enabled at a time.

Examples

Outputting the template tag

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

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Product.CategoryField.[ProductCategoryGroup].[Field].DefaultValue"))) { @* 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].DefaultValue"); }

Outputting the template tag

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

Check if string has a value

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