Ecom:OrderContext.ID

Version: - string  

Summary

Returns the ID for the order context cart.

Settings

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

(Management Center > Ecommerce > Orders - Order Contexts)

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

@GetString("Ecom:OrderContext.ID")

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

<!--@Ecom:OrderContext.ID-->

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)-->