Ecom:Product.IsInCart
Version: - booleanSummary
Returns True if the product is added to the shopping cart - if not the tag is not rendered.
Settings
The value is generated automatically.
Examples
Outputting the template tag
@GetBoolean("Ecom:Product.IsInCart")
Check if tag has a value
@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:Product.IsInCart"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
bool storedTag = GetBoolean("Ecom:Product.IsInCart");
}
Outputting the template tag
<!--@Ecom:Product.IsInCart-->
Check if boolean has a value
<!--@If Defined(@Ecom:Product.IsInCart)-->
Let's output this tag here: <strong><!--@Ecom:Product.IsInCart--></strong>
<!--@EndIf(@Ecom:Product.IsInCart)-->