Ecom:Product.IsActive
Version: - booleanSummary
Returns True if the product is active.
Settings
The value is based on the Active type field for a product.
(Ecommerce > Product Catalog > Product group/product > Details > Activate product)
Examples
Outputting the template tag
@GetBoolean("Ecom:Product.IsActive")
Check if tag has a value
@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:Product.IsActive"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
bool storedTag = GetBoolean("Ecom:Product.IsActive");
}
Outputting the template tag
<!--@Ecom:Product.IsActive-->
Check if boolean has a value
<!--@If Defined(@Ecom:Product.IsActive)-->
Let's output this tag here: <strong><!--@Ecom:Product.IsActive--></strong>
<!--@EndIf(@Ecom:Product.IsActive)-->