OrderContexts

OrderContexts loop

Summary


The OrderContexts loop lets you display various information about the order context carts that are rendered in the current context.

Available tags

<!--@Ecom:OrderContext.ID-->
<!--@Ecom:OrderContext.IsCurrent-->
<!--@Ecom:OrderContext.Name-->
<!--@OrderContextCarts:Order.IsEmpty-->

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.
  • Requires version 8.4.0.0 or newer. 

Read more

Read more about the context carts in the manual:
http://manual.dynamicweb-cms.com/Default.aspx?ID=7615 
http://manual.dynamicweb-cms.com/Default.aspx?ID=7616

Example

Here is an example with mini carts for 2 specific context carts:

<!--@LoopStart(OrderContextCarts)-->
<!--@HeaderStart-->    
<ul>
<!--@HeaderEnd--> 
<!--@If(Ecom:OrderContext.ID=ORDERCONTEXT19 || Ecom:OrderContext.ID=ORDERCONTEXT20)-->
	<li>
	<h3><!--@Ecom:OrderContext.Name--></h3><br />	
								
	<!--@If Defined(OrderContextCarts:Order.IsEmpty)-->
		Cart Is Empty
	<!--@EndIf(OrderContextCarts:Order.IsEmpty)-->

	<!--@If Not Defined(OrderContextCarts:Order.IsEmpty)-->
		<div class="cart_details">	
		<!--@LoopStart(OrderLines)-->
						
		  <!--@If Defined(Ecom:Order:OrderLine.IsProduct)-->
		  <a href="<!--@Ecom:Order:OrderLine.ProductLink-->"><b>
		  <!--@EndIf(Ecom:Order:OrderLine.IsProduct)-->
						
		  <!--@If Not Defined(Ecom:Order:OrderLine.IsProduct)--><i>
		  <!--@EndIf(Ecom:Order:OrderLine.IsProduct)-->
								
		  <!--@Ecom:Order:OrderLine.ProductName--><!--@Ecom:Order:OrderLine.TotalPrice-->
                  <br />
							
		  <!--@If Defined(Ecom:Order:OrderLine.ProductVariantText)-->
		  (<!--@Ecom:Order:OrderLine.ProductVariantText-->)
		  <!--@EndIf(Ecom:Order:OrderLine.ProductVariantText)-->
								
		  <!--@If Not Defined(Ecom:Order:OrderLine.IsProduct)--></i>
		  <!--@EndIf(Ecom:Order:OrderLine.IsProduct)-->
			
		  <!--@If Defined(Ecom:Order:OrderLine.IsProduct)--></b></a>
		  <!--@EndIf(Ecom:Order:OrderLine.IsProduct)-->
							
		<!--@LoopEnd(OrderLines)-->
		
		<br />
		Total Price: <!--@Ecom:Order.OrderLines.Total.Price--></br>
		Items in cart: <!--@Ecom:Order.OrderLines.TotalProductQuantity-->
		</div>								
		
		<div class="cart_icon">

		<!--@If(Ecom:OrderContext.ID=ORDERCONTEXT19)-->
		<a href="/Daily-cart-SHOP1.aspx?CartV2.GotoStep1=true">Checkout</a>
		<!--@EndIf(Ecom:OrderContext.ID)-->

		<!--@If(Ecom:OrderContext.ID=ORDERCONTEXT20)-->
		<a href="/Weekly-cart-SHOP1.aspx?CartV2.GotoStep1=true">Checkout</a>		
		<!--@EndIf(Ecom:OrderContext.ID)-->

		</div>
	<!--@EndIf(OrderContextCarts:Order.IsEmpty)-->
	</li>
<!--@EndIf-->	 
<!--@FooterStart-->
</ul>
<!--@FooterEnd-->
<!--@LoopEnd(OrderContextCarts)-->