Version: - string  


Returns the ID for the order context cart.


The value is based on the ID field in the Order Context settings.

(Management Center > Ecommerce > Orders - Order Contexts)


  • 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.


Outputting the template tag


Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:OrderContext.ID"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:OrderContext.ID"); }

Outputting the template tag


Check if string has a value

<!--@If Defined(@Ecom:OrderContext.ID)--> Let's output this tag here: <strong><!--@Ecom:OrderContext.ID--></strong> <!--@EndIf(@Ecom:OrderContext.ID)-->