Orderlines
Summary
The Orderlines loop lets you display information about the orderlines (product, discount and tax lines) in an order.
Examples
Basic usage
Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop.
Similarly, you have to use @item.GetLoop to use loops inside a loop.
Check if the loop exists
Example of usage
The following general example illustrates how to use a loop construct.
Check if the loop exists
Available tags
Ecom:Order:OrderLine.BOM
Returns True if the orderline is a BOM product (parts list). False otherwise.
@GetString("Ecom:Order:OrderLine.BOM")
Ecom:Order:OrderLine.Date
Returns the date and time the orderline was created.
@GetDate("Ecom:Order:OrderLine.Date")
Ecom:Order:OrderLine.DecrementLink
Returns an URL to decrement the quantity of products for the current orderline.
@GetString("Ecom:Order:OrderLine.DecrementLink")
Ecom:Order:OrderLine.DeleteLink
Returns an URL to remove the orderline.
@GetString("Ecom:Order:OrderLine.DeleteLink")
Ecom:Order:OrderLine.Id
Returns the Id of the orderline.
@GetString("Ecom:Order:OrderLine.Id")
Ecom:Order:OrderLine.IncrementLink
Ecom:Order:OrderLine.IncrementLink
@GetString("Ecom:Order:OrderLine.IncrementLink")
Ecom:Order:OrderLine.IsDiscount
Returns "True" if the orderline is a discount. If not - an empty string is returned (e.g. if it's a product).
@GetString("Ecom:Order:OrderLine.IsDiscount")
Ecom:Order:OrderLine.IsProduct
Returns "True" if the orderline is a product. If not - an empty string is returned (e.g. if it's a discount).
@GetString("Ecom:Order:OrderLine.IsProduct")
Ecom:Order:OrderLine.IsTax
Returns "True" if the orderline is a tax. If not - an empty string is returned (e.g. if it's a product).
@GetString("Ecom:Order:OrderLine.IsTax")
Ecom:Order:OrderLine.Modified
Returns the modification date of the orderline.
@GetDate("Ecom:Order:OrderLine.Modified")
Ecom:Order:OrderLine.OrderID
Returns the order ID of the orderline.
@GetString("Ecom:Order:OrderLine.OrderID")
Ecom:Order:OrderLine.PageID
Returns the ID of the page where there orderline was purchased from.
@GetInteger("Ecom:Order:OrderLine.PageID")
Ecom:Order:OrderLine.ParentLineID
Returns the ID of the parent orderline.
@GetString("Ecom:Order:OrderLine.ParentLineID")
Ecom:Order:OrderLine.Points
Returns the price in points for the orderline product.
@GetDouble("Ecom:Order:OrderLine.Points")
Ecom:Order:OrderLine.Price
Returns the price of the orderline.
@GetPrice("Ecom:Order:OrderLine.Price")
Ecom:Order:OrderLine.PrimaryOrDefaultGroupId
Returns ID of primary or default group for ordrline product.
@GetString("Ecom:Order:OrderLine.PrimaryOrDefaultGroupId")
Ecom:Order:OrderLine.ProductDetailGroupLink
Returns URL to the product group detail page.
@GetString("Ecom:Order:OrderLine.ProductDetailGroupLink")
Ecom:Order:OrderLine.ProductDetailLink
Returns the URL to the product detail page.
@GetString("Ecom:Order:OrderLine.ProductDetailLink")
Ecom:Order:OrderLine.ProductID
Returns the product ID for the orderline.
@GetString("Ecom:Order:OrderLine.ProductID")
Ecom:Order:OrderLine.ProductID.UrlEncoded
Returns the encoded product ID for the orderline.
@GetString("Ecom:Order:OrderLine.ProductID.UrlEncoded")
Ecom:Order:OrderLine.ProductIsActive
Returns True if the product is active.
@GetBoolean("Ecom:Order:OrderLine.ProductIsActive")
Ecom:Order:OrderLine.ProductLink
Returns an URL to the product for the current orderline. DEPRECATED.
@GetString("Ecom:Order:OrderLine.ProductLink")
Ecom:Order:OrderLine.ProductLink.Fixed
Returns an URL (without http) to the product for the current orderline.
@GetString("Ecom:Order:OrderLine.ProductLink.Fixed")
Ecom:Order:OrderLine.ProductName
Returns the product name for the orderline.
@GetString("Ecom:Order:OrderLine.ProductName")
Ecom:Order:OrderLine.ProductName.Short
Returns a short product name for the orderline.
@GetString("Ecom:Order:OrderLine.ProductName.Short")
Ecom:Order:OrderLine.ProductNumber
Returns the product number for the orderline.
@GetString("Ecom:Order:OrderLine.ProductNumber")
Ecom:Order:OrderLine.ProductTaxes.TotalPrice
Returns amount of total price the product's available taxes
@GetString("Ecom:Order:OrderLine.ProductTaxes.TotalPrice")
Ecom:Order:OrderLine.ProductTaxes.TotalPriceFormatted
Returns formatted amount of total price the product's available taxes
@GetString("Ecom:Order:OrderLine.ProductTaxes.TotalPriceFormatted")
Ecom:Order:OrderLine.ProductVariantID
Returns the product variant ID for the orderline.
@GetString("Ecom:Order:OrderLine.ProductVariantID")
Ecom:Order:OrderLine.ProductVariantText
Returns the product variant text for the orderline, e.g. Blue-Small.
@GetString("Ecom:Order:OrderLine.ProductVariantText")
Ecom:Order:OrderLine.Quantity
Returns the quantity of products for the orderline.
@GetDouble("Ecom:Order:OrderLine.Quantity")
Ecom:Order:OrderLine.Quantity.Input.Box
Returns the Quantity input field.
@GetString("Ecom:Order:OrderLine.Quantity.Input.Box")
Ecom:Order:OrderLine.Quantity.Input.Name
Returns the Quantity input field name.
@GetString("Ecom:Order:OrderLine.Quantity.Input.Name")
Ecom:Order:OrderLine.ReverseChargeForVat
This tag is an orderLine property to indicate whether the price is in a reverse charge for VAT state.
@GetBoolean("Ecom:Order:OrderLine.ReverseChargeForVat")
Ecom:Order:OrderLine.RewardPoints
Returns the total number of loyalty points that the customer gets for the orderline.
@GetString("Ecom:Order:OrderLine.RewardPoints")
Ecom:Order:OrderLine.TotalDiscount
Returns total discount amount for the current orderline.
@GetDouble("Ecom:Order:OrderLine.TotalDiscount")
Ecom:Order:OrderLine.TotalPrice
Returns the total price of the orderline.
@GetString("Ecom:Order:OrderLine.TotalPrice")
Ecom:Order:OrderLine.TotalPriceWithoutSymbol
Returns the total price of the orderline - without currency symbol.
@GetString("Ecom:Order:OrderLine.TotalPriceWithoutSymbol")
Ecom:Order:OrderLine.TotalPriceWithProductDiscounts
Returns the total price of the orderline - without currency symbol.
@GetPrice("Ecom:Order:OrderLine.TotalPriceWithProductDiscounts")
Ecom:Order:OrderLine.Type
Returns type of the orderline.
@GetString("Ecom:Order:OrderLine.Type")
Ecom:Order:OrderLine.UnitID
Returns the ID of the orderline unit.
@GetString("Ecom:Order:OrderLine.UnitID")
Ecom:Order:OrderLine.UnitName
Returns the name of the orderline unit.
@GetString("Ecom:Order:OrderLine.UnitName")
Ecom:Order:OrderLine.UnitPoints
Returns unit points of the orderline.
@GetString("Ecom:Order:OrderLine.UnitPoints")
Ecom:Order:OrderLine.UnitPrice
Returns unit price of the orderline.
@GetString("Ecom:Order:OrderLine.UnitPrice")
Ecom:Order:OrderLine.UnitRewardPoints
Returns the total number of loyalty points that the customer gets as reward for the orderline per unit.
@GetDouble("Ecom:Order:OrderLine.UnitRewardPoints")
Ecom:Order:OrderLine.VatPercent
Returns the VAT in percent.
@GetString("Ecom:Order:OrderLine.VatPercent")
Ecom:Order:OrderLine.VatTotalPrice
Returns the VAT amount for the orderline.
@GetString("Ecom:Order:OrderLine.VatTotalPrice")
Ecom:Order:OrderLine.VatTotalPriceWithoutSymbol
Returns the VAT amount for the orderline - without a currency symbol.
@GetString("Ecom:Order:OrderLine.VatTotalPriceWithoutSymbol")
Ecom:Order:OrderLine.Volume
Returns the total volume for the orderline.
@GetDouble("Ecom:Order:OrderLine.Volume")
Ecom:Order:OrderLine.Weight
Returns the total weight for the orderline.
@GetDouble("Ecom:Order:OrderLine.Weight")
Available loops
Ecom:LastAddedProduct.AlternativeImages
Returns the images related to user defined patterns of a product last added to cart.
@foreach (LoopItem item in GetLoop("Ecom:LastAddedProduct.AlternativeImages")){ <p>@item.GetValue("TagName")</p> }
Ecom:Product.AlternativeImages
Returns the images related to user defined patterns of the orderline's product.
@foreach (LoopItem item in GetLoop("Ecom:Product.AlternativeImages")){ <p>@item.GetValue("TagName")</p> }
Product.OrderLineFields
The Order.OrderLineFields
loop lets you display various information about all custom order line fields associated with a product.
@foreach (LoopItem item in GetLoop("Product.OrderLineFields")){ <p>@item.GetValue("TagName")</p> }