Context Order Renderer
Render user orders in emails
The Context Order Renderer paragraph app is usually used in an email context where it can render order lines e.g. in a Order Confirmation email or an Abandoned Cart email.
To use the app:
- Add a new paragraph to a page e.g. an email and attach the Context Order Renderer app to it
- Select or create an appropriate template
- Click Save and close
The template can include an overview of order lines with the use of the loop GetLoop("OrderLines")
and TemplateTags, such as:
<!-- Render image, product name, quantity and price -->
@foreach (LoopItem orderline in GetLoop("OrderLines"))
{
<tr>
<!-- Check if a product -->
@if (orderline.GetString("Ecom:Order:OrderLine.Type") == "0")
{
<td>
<img src="@orderline.GetString("Ecom:Product.PrimaryImage")" />
</td>
}
<td>
@orderline.GetValue("Ecom:Order:OrderLine.ProductName")
</td>
<td>
<!-- Check if a product -->
@if (orderline.GetString("Ecom:Order:OrderLine.Type") == "0")
{
@orderline.GetValue("Ecom:Order:OrderLine.Quantity")
}
</td>
<td>
@orderline.GetValue("Ecom:Order:OrderLine.Price.PriceWithoutVATFormatted")
</td>
</tr>
}