1

I have multi currency in website but when I change currency over configured product. It is showing wrong price after change currency.

6

This magento2 bug.

Path: vendor\magento\module-catalog\Block\Product\View.php Line: 237-259

You need replace below code.This is a temporary fix. Please upgrade to the latest version if it is not working.

$config = [
            'productId' => $product->getId(),
            'priceFormat' => $this->_localeFormat->getPriceFormat(),
            'prices' => [
                'oldPrice' => [
                    'amount' => 
                        $product->getPriceInfo()->getPrice('regular_price')->getAmount()->getValue()
                    ,
                    'adjustments' => []
                ],
                'basePrice' => [
                    'amount' => 
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getBaseAmount()
                    ,
                    'adjustments' => []
                ],
                'finalPrice' => [
                    'amount' => 
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()
                    ,
                    'adjustments' => []
                ]
            ],
            'idSuffix' => '_clone',
            'tierPrices' => $tierPrices
        ];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy