Magento 2.0.4のインストール後、非常に奇妙な問題に直面しています。12ドルの価格で製品を作成し、バックエンドでMagento構成からロケールを変更しました。
以下は、リストページのスクリーンショットです。
詳細ページのスクリーンショットもご覧ください。
2つのスクリーンショットの違いに気づいたかもしれません。はい、商品詳細ページには0.00ドルの価格が表示されますが、リストページには追加した価格が保持されます。
製品の詳細ページでは、1〜2秒後に正しい価格が自動的に0ドルに更新されます(Javascriptの更新)。
以下のコードを見つけてください
$('[data-price-type="' + priceCode + '"]', this.element).html(priceTemplate({data: price}));さらにコードをデバッグして、Magento 2価格ボックスウィジェットにパラメーターを渡す別のjavascriptコードを見つけます。
<script>
    require([
        'jquery',
        'Magento_Catalog/js/price-box'
    ], function($){
        var priceBoxes = $('[data-role=priceBox]');
        priceBoxes = priceBoxes.filter(function(index, elem){
            return !$(elem).find('.price-from').length;
        });
        priceBoxes.priceBox({'priceConfig': <?php /* @escapeNotVerified */ echo $block->getJsonConfig() ?>});
    });
</script>これでgetJsonConfig()メソッドをチェックしました。
  $product = $this->getProduct();
        if (!$this->hasOptions()) {
            $config = [
                'productId' => $product->getId(),
                'priceFormat' => $this->_localeFormat->getPriceFormat()
                ];
            return $this->_jsonEncoder->encode($config);
        }
        $tierPrices = [];
        $tierPricesList = $product->getPriceInfo()->getPrice('tier_price')->getTierPriceList();
        foreach ($tierPricesList as $tierPrice) {
            $tierPrices[] = $this->priceCurrency->convert($tierPrice['price']->getValue());
        }
        $config = [
            'productId' => $product->getId(),
            'priceFormat' => $this->_localeFormat->getPriceFormat(),
            'prices' => [
                'oldPrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('regular_price')->getAmount()->getValue()
                    ),
                    'adjustments' => []
                ],
                'basePrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getBaseAmount()
                    ),
                    'adjustments' => []
                ],
                'finalPrice' => [
                    'amount' => $this->priceCurrency->convert(
                        $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue()
                    ),
                    'adjustments' => []
                ]
            ],
            'idSuffix' => '_clone',
            'tierPrices' => $tierPrices
        ];コードを介して多くのデバッグを行い、ロケールのサポートにICUDATAを使用しているという結論に達しました。
私はこのすべてに固執しています、それはPriceFormatの問題のようです。
この問題は、Persion(イラン)などの特定のロケールオプションでのみ発生することを確認してください。

