diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php index 2c4af877568c3d9d33dfb033d034c254e03b376f..bcfef825f53453c3df348a1ea0313aebca153cac 100644 --- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php +++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Price.php @@ -53,14 +53,12 @@ class Price extends \Magento\Ui\Component\Listing\Columns\Column $store = $this->storeManager->getStore( $this->context->getFilterParam('store_id', \Magento\Store\Model\Store::DEFAULT_STORE_ID) ); - $currencyCode = $store->getCurrentCurrencyCode(); - $currencyRate = $store->getCurrentCurrencyRate(); - $currency = $this->localeCurrency->getCurrency($currencyCode); + $currency = $this->localeCurrency->getCurrency($store->getBaseCurrencyCode()); $fieldName = $this->getData('name'); foreach ($dataSource['data']['items'] as & $item) { if (isset($item[$fieldName])) { - $item[$fieldName] = $currency->toCurrency(sprintf("%f", $item[$fieldName] * $currencyRate)); + $item[$fieldName] = $currency->toCurrency(sprintf("%f", $item[$fieldName])); } } } diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php index e48634a2c7d54cc513997d3b742ed612f9594c8b..9c7c67395a1e33134e02e32b64da66146c51d642 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php @@ -54,6 +54,12 @@ class Matrix extends \Magento\Backend\Block\Template /** @var null|array */ private $productAttributes; + + /** + * @var \Magento\Framework\Locale\CurrencyInterface + */ + protected $localeCurrency; + /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurableType @@ -72,6 +78,7 @@ class Matrix extends \Magento\Backend\Block\Template \Magento\ConfigurableProduct\Model\Product\Type\VariationMatrix $variationMatrix, ProductRepositoryInterface $productRepository, \Magento\Catalog\Helper\Image $image, + \Magento\Framework\Locale\CurrencyInterface $localeCurrency, array $data = [] ) { parent::__construct($context, $data); @@ -80,6 +87,7 @@ class Matrix extends \Magento\Backend\Block\Template $this->stockRegistry = $stockRegistry; $this->variationMatrix = $variationMatrix; $this->productRepository = $productRepository; + $this->localeCurrency = $localeCurrency; $this->image = $image; } @@ -88,7 +96,7 @@ class Matrix extends \Magento\Backend\Block\Template */ public function getCurrencySymbol() { - return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencySymbol(); + return $this->localeCurrency->getCurrency($this->_storeManager->getStore()->getBaseCurrencyCode())->getSymbol(); } /**