Skip to content

Commit 8671715

Browse files
committed
#19897: MSRP block caching fix.
1 parent 78819fa commit 8671715

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/code/Magento/Msrp/Pricing/Price/MsrpPrice.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ public function canApplyMsrp(Product $product)
9393
}
9494

9595
/**
96+
* Check if is minimal price is less than the msrp.
97+
*
9698
* @param Product $product
9799
* @return bool|float
98100
*/

app/code/Magento/Msrp/Pricing/Render/PriceBox.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,16 @@ public function getMsrpPriceCalculator(): MsrpPriceCalculatorInterface
5959
{
6060
return $this->msrpPriceCalculator;
6161
}
62+
63+
/**
64+
* @inheritDoc
65+
*/
66+
public function getCacheKey()
67+
{
68+
return sprintf(
69+
'%s-%s',
70+
parent::getCacheKey(),
71+
$this->getZone()
72+
);
73+
}
6274
}

0 commit comments

Comments
 (0)