Ecom:OrderContext.IsCurrent
Version: - booleanSummary
Returns True if the order context is default for the shop or selected by the parameter OrderContext=mycontext.
Settings
The value is generated automatically, but based on the selection in Management Center > Ecommerce - Product Catalog > Shops > Shop > Settings > Default cart.
Remarks
- The OrderContext loop is not rendered when the context is not set in the settings for your website.
- You need to select a Shop in your website settings - ecommerce in order to render the Context loop on your website.
Examples
Outputting the template tag
@GetBoolean("Ecom:OrderContext.IsCurrent")
Check if tag has a value
@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:OrderContext.IsCurrent"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
bool storedTag = GetBoolean("Ecom:OrderContext.IsCurrent");
}
Outputting the template tag
<!--@Ecom:OrderContext.IsCurrent-->
Check if boolean has a value
<!--@If Defined(@Ecom:OrderContext.IsCurrent)-->
Let's output this tag here: <strong><!--@Ecom:OrderContext.IsCurrent--></strong>
<!--@EndIf(@Ecom:OrderContext.IsCurrent)-->