Skip to content

Commit e908e6c

Browse files
committed
MAGETWO-59089: Problem with change currency
- Added code to properly toggle display currency on front-end when multiple currencies are set
1 parent 9ed631d commit e908e6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/internal/Magento/Framework/Pricing/Render/PriceBox.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ public function getCacheKey()
8686
*/
8787
protected function getCacheLifetime()
8888
{
89-
return parent::hasCacheLifetime() ? parent::getCacheLifetime() : self::DEFAULT_LIFETIME;
89+
if ($this->hasData('cache_lifetime')) {
90+
$cacheLifeTime = $this->getData('cache_lifetime');
91+
return (int)$cacheLifeTime;
92+
} else {
93+
return parent::hasCacheLifetime()? parent::getCacheLifetime() : null;
94+
}
9095
}
9196

9297
/**

0 commit comments

Comments
 (0)