Home > widget-integration > FilterController > calculateSaleInfo
FilterController.calculateSaleInfo() method
Calculates sale information (is on sale, sale percentage, sale amount)
Signature:
protected calculateSaleInfo(prices: {
priceMin: string;
compareAtPriceMin: string;
}): {
isSale: boolean;
salePercent: string | undefined;
saleAmount: number | undefined;
};
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
prices |
{ priceMin: string; compareAtPriceMin: string; } |
Price information |
Returns:
{ isSale: boolean; salePercent: string | undefined; saleAmount: number | undefined; }
Sale calculation results