0

请指导我如何解决这个问题。一旦选择了一个选项,货币符号(新卢比)就会在产品视图页面中消失,即使是产品图片旁边的价格也是如此。我认为这可能与js问题有关,因为当页面加载时它显示正确,

非常感谢您的宝贵时间,

4

2 回答 2

1

I found this solution that worked for me:

http://vithyamagento.wordpress.com/2012/09/21/magento-currency-symbol-dissapears-in-the-case-of-configurable-products-once-an-option-is-selected/

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

于 2013-10-16T09:01:14.540 回答
0

请将此代码添加到您要显示产品价格的货币符号的位置。

获取当前商店的货币符号:

Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();

获取当前商店的货币代码:

Mage::app()->getStore()->getCurrentCurrencyCode();

获取指定货币代码的货币符号:

Mage::app()->getLocale()->currency('EUR')->getSymbol();

希望它对你有用:)

于 2012-06-04T07:08:34.593 回答