2014-10-08 107 views

回答

0

根据system/library/currency.php源代码,你可以拨打:

$this->currency->set('GBP'); 
在控制器

任何地方。这也被称为每当用户通过点击标题中的货币符号改变货币 - 你可以在catalog/controller/module/currency.php检查:

if (isset($this->request->post['currency_code'])) { 
     $this->currency->set($this->request->post['currency_code']); 
     // ... 
    } 

不幸的是没有检查您是否尝试设置现有的(定义,注册)货币代码或不是所以请确保您仅使用您的数据库中存在的代码(即通过管理创建的代码)。

相关问题