使用は
//First you need to find base currency code and then find current currency code...
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
$price = $customPrice;
// and then convert price from base currency to current currency
$customPrice = $Current_currency_price = Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $currentCurrencyCode);
は、あなたがあなたのコードを使用することができます...それはあなたを助けることを願っています:
$item->setCustomPrice($customPrice);
$item->setOriginalCustomPrice($customPrice);
$item->getProduct()->setIsSuperMode(true);
返信ありがとうございます。しかし、私は現在の通貨で問題に直面していません。私はカスタム価格でカートに商品を追加しました。これは問題ありません。今すぐカートのページで通貨を切り替えると、その商品の価格の値は変更されません。 –
こんにちは@ gulshan maurya、あなたは上記のタスクの解決策を見つけましたか?私にここで教えてください –
私はまだ解決策を見つけられませんでしたが、関連するタスクは現在保留中です。もし私がより良い解決策を得るなら、私はここで更新します。 –