OrderContextCarts:Order.IsEmpty
Version: - booleanSummary
Returns True if the context cart doesn't contain products.
Settings
The value is generated automatically.
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("OrderContextCarts:Order.IsEmpty")
Check if tag has a value
@if(!bool.IsNullOrWhiteSpace(GetBoolean("OrderContextCarts:Order.IsEmpty"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
bool storedTag = GetBoolean("OrderContextCarts:Order.IsEmpty");
}
Outputting the template tag
<!--@OrderContextCarts:Order.IsEmpty-->
Check if boolean has a value
<!--@If Defined(@OrderContextCarts:Order.IsEmpty)-->
Let's output this tag here: <strong><!--@OrderContextCarts:Order.IsEmpty--></strong>
<!--@EndIf(@OrderContextCarts:Order.IsEmpty)-->