VariantSpecialOffer¶
The VariantSpecialOffer object represents a variant special offer in the storefront.
classDiagram
direction LR
VariantSpecialOffer --> SpecialOffer
VariantSpecialOffer --> Price
class SpecialOffer{
}
class Price{
}
class VariantSpecialOffer{
SpecialOffer details
Price price
Price unitPrice
Price priceDifference
float discountPercentage
string formatDiscount
?Price priceInProductCurrency
?Price unitPriceInProductCurrency
?Price priceDifferenceInProductCurrency
}
Properties¶
| Attribute name | Type | Description |
|---|---|---|
| details | SpecialOffer |
The SpecialOffer object representing a promotion details. |
| price | Price |
The Price object representing the special offer price of the variant. |
| unitPrice | Price |
The Price object representing the special offer unit price of the variant. |
| priceDifference | Price |
The Price object representing the price difference between special offer price and base price. |
| discountPercentage | float |
Represents the percentage discount. |
| priceInProductCurrency | null|Price |
The Price object representing the special offer price of the variant in currency set on product. |
| unitPriceInProductCurrency | null|Price |
The Price object representing the special offer unit price of the variant in currency set on product. |
| priceDifferenceInProductCurrency | null|Price |
The Price object representing the price difference between special offer price and base price in currency set on product. |
| formatDiscount | string |
Returns the rounded percentage discount with % character. formatDiscount is also called while displaying |