Skip to content

Commit

Permalink
Fixed wrong tax rate in price details block
Browse files Browse the repository at this point in the history
The price details block will be used multiple times when rendering product listings and for every iteration, a new saleable item will be set. The getter for tax_rate is cached though and will return the same tax rate for every item in the product list, even if tax rates differ.
This fix unsets the cached tax rate after setting a new saleable item.
  • Loading branch information
aeno authored Jan 19, 2017
1 parent 8165f6a commit 0e1465b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Block/Price/Details.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function __construct(
public function setSaleableItem(\Magento\Framework\Pricing\SaleableInterface $saleableItem)
{
$this->saleableItem = $saleableItem;
$this->unsetData('tax_rate');
}

/**
Expand Down

0 comments on commit 0e1465b

Please sign in to comment.