Frage

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

War es hilfreich?

Lösung

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
        ];
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top