System - Configuration - Currency Setup 在右边Currency Options里的Allowed currencies勾选,

然后 System - Manage Currency Rates 点击Import自动设置汇率或者自己手动输入,然后保存。

(像Magento安装IPS支付通道就需要先设置人民币CNY的汇率)

如此Magento后台设置多货币的处理就OK了。

<?php if($this->getCurrencyCount()>1): ?>
        <div id="currency_html" style="display:none">
        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
            <input type="radio" name="currency_radio" id="currency_radio" onclick="changeCurrency('<?php echo $_code ?>')" value="<?php echo $_code ?>"<?php if($_code==$this->getCurrentCurrencyCode()): ?> checked <?php endif; ?>>
                <?php echo $_code ?>
        <?php endforeach; ?>
       </div>
<script type="text/javascript">
//<![CDATA[
function changeCurrency(sObject){
    if(sObject){
        setLocation('<?php echo $this->helper('directory/url')->getSwitchCurrencyUrl() ?>currency/'+sObject);
    }
}
//]]>
document.getElementById('currency_display').innerHTML=document.getElementById('currency_html').innerHTML;
</script>
<?php endif; ?>

Magento前台自定义显示多货币选项 :

假定用的主题是:app/design/frontend/base/default/ 这个,

修改模板文件template/directory/currency.phtml 这个改为以上内容:


然后在头部位置:template/page/html/header.phtml 挑个位置加入以下内容:

<div id="currency_display" ></div>

接着修改布局文件,要加的内容(代号A)都是:

<block type="directory/currency" name="right_currency" before="-" template="directory/currency.phtml"/>

首页显示多货币选项 更改default/layout/cms.xml ,在<cms_page translate="label">这个位置里的<reference name="content">里面加上代号A。

目录页和商品详细页面显示多货币选项 ,default/layout/catalog.xml 这个文件里的<default><reference name="left">里加入代号A。

后台清空Cache。

重新刷新访问,Magento显示多货币选项如预期的实现了。

Magento显示多货币,Magento 多货币设置的更多相关文章

  1. Magento架构师的笔记-----Magento显示当前目录的父分类和子分类的分类名

    在Magento目录的分类页面里,希望在左侧导航获取到父分类和子分类,可以用以下方法:打开app/your_package/your_themes/template/catalog/navigatio ...

  2. magento转移服务器和magento建立多站点总结

    magento转移服务器和magento建立多站点总结第一. 我们首先要做的就是把服务器上的magento转移到本地上来.详细步骤:1. 直接用magento的备份系统把网上数据库备份.如图:2. 数 ...

  3. Magento 2 Plugin - Interceptor - Magento 2插件 - 拦截器-插件开发

    Magento 2 Plugin - Interceptor - Magento 2插件 - 拦截器 Magento 2 Plugin is a technical plugin for your b ...

  4. 深入理解Magento - 第五章 Magento资源配置

    对于任何一个更新频繁的项目来说,保持开发环境和生产环境的数据库同步是件很头疼的事情.Magento提供了一套系统,用版本化的资源迁移脚本来解决这个问题. 上一章,我们为 Helloworld Blog ...

  5. eclipse android logcat 只显示自己应用程序信息的设置方法

    1 elcipse 中往往会在logcat中显示 all message ,而这里面的信息太多,根本没有办法进行区分.如图: 2 我们想显示自己项目的 logcat .下面开始设置. 3 首先点击上面 ...

  6. 使用 <embed> 标签显示 flash文件(swf)格式 ,如何设置 width 和 height 宽度,高度.

    1. embed 标签 支持  .swf 格式.     .flv 的不支持. 2. 通常情况下, 网站中上传 多个 flash文件. 它的默认大小是不一样的. 而且 可以 宽度 大于 高度(横向的) ...

  7. PPT幻灯片放映不显示备注,只让备注显示在自己屏幕上-投影机 设置

    无论是老师或是讲师还是即将要演讲的人,在讲课之前一定会做好课件,到哪一页该讲哪些内容,到哪里该如何去讲等等.那么一般的讲师会将这些课件存放到哪里呢?是用个书本记载下来呢,还是直接存放到电脑上呢?其实本 ...

  8. magento模板 -- 如何安装magento模板

    在magento下面安装模板首先要了解magento的模板结构: 每个magento模板都包含如下的类似结构: --app/design/frontend/default/[模板名称] ------- ...

  9. 2018.11.10 Mac设置Eclipse的 .m2文件夹是否可见操作&&Mac系统显示当前文件夹的路径设置

    第一行就是设置为可见的记得要重启Finder不然是没有效果的 第二行就是设置为不可见的 打开"终端"(应用程序->实用工具),输入以下两条命令: defaults write ...

随机推荐

  1. performSelector和performSelectorInBackground

    前者是在主线程下完成的, 不会自动创建一个线程. 后者会创建一个新的线程.

  2. blade and soul races guide

    Race Four races are available for those who wish to choose the path of martial arts: the careful Gon ...

  3. Java线程(七):Callable和Future

    转自:http://blog.csdn.net/ghsau/article/details/7451464 本篇说明的是Callable和Future,它俩很有意思的,一个产生结果,一个拿到结果. C ...

  4. HashBytes(Transact-SQL)

    返回其输入的MD2.MD4.MD5.SHA或SHA1哈希值 语法 HashBytes('<algorithm>',{@input|'input'}) <algorithm>:: ...

  5. sql 删除数据库所有用户表

    --变量@tablename保存表名 declare @tablename nvarchar() --将用户表全部保存到临时表#tablename中 SELECT [name] into #table ...

  6. 支付宝APP支付后台参数生成Java版(一)

    一.支付参数组装: String[] parameters={ "service=\"mobile.securitypay.pay\"",//固定值 " ...

  7. textbox只能输入数字或中文的常用正则表达式和验证方法

    验证数字的正则表达式集 验证数字:^[0-9]*$ 验证n位的数字:^\d{n}$ 验证至少n位数字:^\d{n,}$ 验证m-n位的数字:^\d{m,n}$ 验证零和非零开头的数字:^(0|[1-9 ...

  8. Delphi: 有关Form处理 :需要调用的时候进行调用。

    if not Assigned(frmAppServer) then frmAppServer := TfrmAppServer.Create(Application); frmAppServer.S ...

  9. python tips(持续更新)

    1. 引用上一层目录 import syssys.path.append('..')import xx 2. python json JSON是一种轻量级的数据交换格式.可以解决数据库中文存储问题,对 ...

  10. logistc regression练习(三)

    % Exercise 4 -- Logistic Regression clear all; close all; clc x = load('E:\workstation\data\ex4x.dat ...