The following variables are available in cart recovery email templates.
You can also use the global functions (except those related to time, and the functions assetURL, cookie, decimal, parseDecimal, parseDuration, search, setCookie, snippet and translate).
var (
// Checkout URL.
checkoutURL string
// Indicates whether the customer is registered.
isRegistered bool
// Items in the cart.
items []CartItem
// Cart token.
token string
)
The CartItem type represents an item in the cart.
type CartItem struct {
// Short product description.
Description html
// Discount from the list price. Empty when Rows is not empty.
Discount Discount
// Indicates whether it is available for pre-order.
IsPreOrder bool
// List price. Zero when Rows is not empty.
ListPrice Price
// Medium product image.
MediumImage Image
// Item name.
Name string
// Tax percentage.
PercentTax Decimal
// Price. Zero when Rows is not empty.
Price Price
// Producer.
Producer html
// Product identifier.
ProductID int
// Promotions applied to the item. Empty when Rows is not empty.
Promotions []CartItemPromotion
// Quantity.
Quantity Decimal
// SKU.
SKU string
// Small product image.
SmallImage Image
// Total price.
TotalPrice Price
// Product thumbnail image.
ThumbnailImage Image
// Product page URL.
URL string
// Weight.
Weight Decimal
}
The CartItemRow type represents a row in the cart.
type CartItemRow struct {
// Discount from the list price.
Discount Discount
// List price.
ListPrice Price
// Price.
Price Price
// Promotions applied to the row.
Promotions []CartItemPromotion
// Quantity.
Quantity Decimal
// Total price.
TotalPrice Price
}
The CartItemPromotion type represents a promotion applied to the row.
type CartItemPromotion struct {
// Promotion identifier.
ID int
// Promotion name.
Name string
}