2014-03-27 30 views

回答

1

使文件magento\app\code\core\Mage\Directory\controllers\CurrencyController.php

的变化而变化的函数

public function switchAction() 
     { 
      if ($curency = (string) $this->getRequest()->getParam('currency')) { 

      // add message 
      if($curency=="USD") 
       Mage::getSingleton('core/session')->addSuccess("your message"); 

       Mage::app()->getStore()->setCurrentCurrencyCode($curency); 
      } 
      $this->_redirectReferer(Mage::getBaseUrl()); 
     } 
+0

非常感谢。你救了我的生命:-) – user3469531

+0

你能帮我解决另一个问题吗?我的网站会根据地理位置(通过IP地址)自动显示产品价格。我需要停用美国客户的美元价格,并将英国和美国客户的英镑作为默认货币。 – user3469531