Magento显示多货币,Magento 多货币设置
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 多货币设置的更多相关文章
- Magento架构师的笔记-----Magento显示当前目录的父分类和子分类的分类名
在Magento目录的分类页面里,希望在左侧导航获取到父分类和子分类,可以用以下方法:打开app/your_package/your_themes/template/catalog/navigatio ...
- magento转移服务器和magento建立多站点总结
magento转移服务器和magento建立多站点总结第一. 我们首先要做的就是把服务器上的magento转移到本地上来.详细步骤:1. 直接用magento的备份系统把网上数据库备份.如图:2. 数 ...
- Magento 2 Plugin - Interceptor - Magento 2插件 - 拦截器-插件开发
Magento 2 Plugin - Interceptor - Magento 2插件 - 拦截器 Magento 2 Plugin is a technical plugin for your b ...
- 深入理解Magento - 第五章 Magento资源配置
对于任何一个更新频繁的项目来说,保持开发环境和生产环境的数据库同步是件很头疼的事情.Magento提供了一套系统,用版本化的资源迁移脚本来解决这个问题. 上一章,我们为 Helloworld Blog ...
- eclipse android logcat 只显示自己应用程序信息的设置方法
1 elcipse 中往往会在logcat中显示 all message ,而这里面的信息太多,根本没有办法进行区分.如图: 2 我们想显示自己项目的 logcat .下面开始设置. 3 首先点击上面 ...
- 使用 <embed> 标签显示 flash文件(swf)格式 ,如何设置 width 和 height 宽度,高度.
1. embed 标签 支持 .swf 格式. .flv 的不支持. 2. 通常情况下, 网站中上传 多个 flash文件. 它的默认大小是不一样的. 而且 可以 宽度 大于 高度(横向的) ...
- PPT幻灯片放映不显示备注,只让备注显示在自己屏幕上-投影机 设置
无论是老师或是讲师还是即将要演讲的人,在讲课之前一定会做好课件,到哪一页该讲哪些内容,到哪里该如何去讲等等.那么一般的讲师会将这些课件存放到哪里呢?是用个书本记载下来呢,还是直接存放到电脑上呢?其实本 ...
- magento模板 -- 如何安装magento模板
在magento下面安装模板首先要了解magento的模板结构: 每个magento模板都包含如下的类似结构: --app/design/frontend/default/[模板名称] ------- ...
- 2018.11.10 Mac设置Eclipse的 .m2文件夹是否可见操作&&Mac系统显示当前文件夹的路径设置
第一行就是设置为可见的记得要重启Finder不然是没有效果的 第二行就是设置为不可见的 打开"终端"(应用程序->实用工具),输入以下两条命令: defaults write ...
随机推荐
- 权重和层叠规则决定了CSS样式优先级
一.基本的优先级规则 比较同一级别的个数,数量多的优先级高,如果相同即比较下一级别的个数,至于各级别的优先级如下: important > 内联 > ID > 类 > 标签 | ...
- [原创]在Docker上部署mongodb分片副本集群。
一.安装docker. 请参考:http://www.cnblogs.com/hehexiaoxia/p/6150584.html 二.编写dockerfile. 1.在根目录下创建mongod的do ...
- 工具 cocoapods和插件
命令行更新(安装)步骤 $ sudo gem update --system // 先更新gem,国内需要切换源 $ gem sources --remove https://rubygems.org ...
- 数据类型、常量、变量、printf、scanf和运算符
数据类型 常量 变量 printf函数介绍 scanf函数介绍 运算符 数据类型 数据类型是指数据在内存中存储的方式. C语言中有5大数据类型:基本类型.构造类型.指针类型.空类型.定义类型. C语言 ...
- 在ubuntu中安装psutil
环境:ubuntu 16.04 LTS + python 2.7/3.5共存 + psutil 4.3.0 1.sudo apt-get install python3-dev # 先把python3 ...
- iOS中 HTTP/Socket/TCP/IP通信协议详解
// OSI(开放式系统互联), 由ISO(国际化标准组织)制定 // 1. 应用层 // 2. 表示层 // 3. 会话层 // 4. 传输层 // 5. 网络层 // 6. 数据链接层 // 7. ...
- Fastest Wordpress Theme -wpfast Download
Are you in search of fastest wordpress theme to increase your product sell and conversion ,then you ...
- virtual_login
from selenium import webdriverimport timedriver = webdriver.Chrome()driver.set_window_position(30, 4 ...
- k8s pv
这个文档描述当前在k8s中PersistentVolumes的使用. 我们建议和volume一起进行了解 Introduction 管理存储和管理计算是截然不同的问题. 持久存储子系统对用 ...
- mysql数据库每日定时自动备份
使用navicat