AllDiscounts
Summary
The AllDiscounts
loop lets you display information about all discounts.
The Loop provides the possibility to render:
- All the sales discounts, with available tags.
- All the order discounts, with available tags.
Note that it's not recommended to use both sales discounts and order discounts at the same time.
Remarks
The AllDiscounts
loop limited by Shop and Country from Limitations and Language. ALL discounts are rendered otherwise. There is No validation of the parameters in the discount settings - except from Shop and Country from Limitations and Language. It's only a "raw" list of available discounts.
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:Product.Discount.Amount
Returns the discount amount.
@GetDouble("Ecom:Product.Discount.Amount")
Ecom:Product.Discount.CheckForValidationReason
Returns True if discount is marked for check validation reason.
@GetBoolean("Ecom:Product.Discount.CheckForValidationReason")
Ecom:Product.Discount.Description
Returns the description of the discount.
@GetString("Ecom:Product.Discount.Description")
Ecom:Product.Discount.Discount.Class
Returns how the discount is applied to an order.
@GetString("Ecom:Product.Discount.Discount.Class")
Ecom:Product.Discount.ID
Returns the ID of the discount.
@GetInteger("Ecom:Product.Discount.ID")
Ecom:Product.Discount.Name
Returns the name of the discount.
@GetString("Ecom:Product.Discount.Name")
Ecom:Product.Discount.Percent
Returns the discount percentage.
@GetDouble("Ecom:Product.Discount.Percent")
Ecom:Product.Discount.Product
Returns the name of the product that is selected as discount.
@GetString("Ecom:Product.Discount.Product")
Ecom:Product.Discount.Type
Returns the discount type.
@GetString("Ecom:Product.Discount.Type")
Ecom:Product.Discount.ValidFrom
Returns the start date of the discount validity.
@GetDate("Ecom:Product.Discount.ValidFrom")
Ecom:Product.Discount.ValidTo
Returns the end date of the discount validity.
@GetDate("Ecom:Product.Discount.ValidTo")