请指导我如何解决这个问题。一旦选择了一个选项,货币符号(新卢比)就会在产品视图页面中消失,即使是产品图片旁边的价格也是如此。我认为这可能与js问题有关,因为当页面加载时它显示正确,
非常感谢您的宝贵时间,
请指导我如何解决这个问题。一旦选择了一个选项,货币符号(新卢比)就会在产品视图页面中消失,即使是产品图片旁边的价格也是如此。我认为这可能与js问题有关,因为当页面加载时它显示正确,
非常感谢您的宝贵时间,
I found this solution that worked for me:
As a summary, in js\varien\product.js you need to replace the call to the formatCurrency(price, this.priceFormat); to a custom formatting function, and then create that custom formatting function in js\varien\js.js
请将此代码添加到您要显示产品价格的货币符号的位置。
获取当前商店的货币符号:
Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
获取当前商店的货币代码:
Mage::app()->getStore()->getCurrentCurrencyCode();
获取指定货币代码的货币符号:
Mage::app()->getLocale()->currency('EUR')->getSymbol();
希望它对你有用:)