Since Magento has built in functionality for currencies, it shouldn’t be too hard to create custom currency selector and put it to the header. You might say this tutorial is for beginners, since it’s pretty much straightforward.

You might have noticed the ”Currency Setup” tab in Magento’s Administration under “System->Configuration” menu. There you should select default site currency, and besides that, all currencies you want to support.

Here’s a screenshot of that tab:

After that, you should go to “System->Manage Currency Rates” and set rates for currencies you’ve chosen before. You can use Webservicex to import currency rates from Webservicex service. Here’s how it looks like:

And now, after you’re done with initial setup, let’s go further with modifications to make that output shows in the header.

If you would like to move the currency switcher from the left column to the header, you can use the following instructions to do so!

Open /app/design/frontend/default/default/layout/page.xml (or under your theme)
Locate:

<block type="page/html_header" name="header" as="header">

Change to:

<block type="page/html_header" name="header" as="header"><block type="directory/currency" name="currency" template="directory/currency.phtml"/...</block>

Open /app/design/frontend/default/default/template/page/html/header.phtml (or under your theme)
After:

<?php echo $this->getChildHtml('store_language') ?>

Insert:

<?php echo $this->getChildHtml('currency') ?>

Save, Upload + Clear Cache
Make sure you have imported or manually entered your Currency Rates otherwise the switcher will not appear!

Its as simple as that!!

from:

http://inchoo.net/ecommerce/magento/how-to-add-currency-selector-to-magentos-header/

http://www.pauldonnelly.net/magento-move-currency-switcher-to-the-header/

Magento 显示下拉货币 How to add Currency selector to Magento’s header相关推荐

  1. 右边菜单_Excel – 如何始终显示下拉菜单右边的小箭头?

    制作下拉菜单,不是什么高深的技巧,我在各种案例中也经常会用到. 如果要学习多级联动菜单的制作,可参见 Excel indirect 函数(2) – 制作多级联动菜单(文末彩蛋) 最近有同学提出了一个关 ...

  2. 解决在 IntelliJ IDEA 中,输入代码时突然不会自动显示下拉框提示

    解决在 IntelliJ IDEA 中,输入代码时突然不会自动显示下拉框提示 笔者的运行环境: IntelliJ IDEA 2020.1.2 (Ultimate Edition) JDK 13.0.2 ...

  3. php 显示下拉菜单,PHP在下拉列表中显示菜单树

    菜单树的功能: function category_tree($parent_id) { $sql = "SELECT * FROM menu WHERE parent_id ='" ...

  4. CSS - 鼠标移入悬停显示下拉菜单(导航栏鼠标经过 hover 时出现二级菜单)

    前言 该效果很常见,网上的代码都非常的乱,样式改起来非常难受. 本文提供 "最简洁" 的解决方案与干净整洁的代码,一眼看过去就知道改哪里, 配合 Vue.js 项目非常合适,如下图 ...

  5. 鼠标悬浮导航栏显示下拉菜单

    在这里介绍鼠标悬停导航栏显示下拉菜单得两种方法,html和css样式就不贴代码了. 1.原生js <script>// window.onload = function(){// 获取需要 ...

  6. 仿百度搜索显示下拉框(一)

    # 最近在写一个旅游网站的小案例,其中的一个功能:搜索同时显示下拉框 本文所用的知识主要有:JQuery语法,ajax异步加载,ssh框架: 1:逻辑分析: 事件分析:在输入框中输入值后,下拉框即显示 ...

  7. html下拉列表自动打开,HTML SELECT 标签自动显示下拉选项

    1.思路: 当拿到这个问题的时候,第一个想法是百度(没啥鸟用,换谷歌吧).没有找到解决办法. 然后开始尝试触发select的onclick事件, 依然没有鸟用.这时候我就开始想select标签的实现, ...

  8. html鼠标移入显示下拉框,小白求助!鼠标移入移出显示下拉菜单问题!

    是不是导航栏中的每个菜单移入移出都得分开不同的函数,都要重新命名不同的变量吗?不然怎么避免我鼠标移入这个菜单,别的菜单的下拉不会显示的问题? 这是我写的一个代码: 二级菜单下拉 *{ margin:0 ...

  9. 鼠标悬浮显示下拉菜单,离开隐藏

    在网页版的csdn中,当用户将鼠标悬浮在头像框上时,会自动显示一个下拉菜单,这篇博客实现的就是这样的功能,但在文章内只记录核心的功能,不对样式做过多修饰 效果如下: 下拉菜单的显示隐藏只需要设置dis ...

最新文章

  1. 利用Nginx轻松实现Ajax的跨域请求(前后端分离开发调试必备神技)
  2. Setting up Ethereum smart contract development using Parity on Ubuntu
  3. !Important:CSS中!important的作用用于Ie6.0 与Ie7.0、firefox
  4. transfer = C only read dynamically - why it fails to work
  5. 2058. 找出临界点之间的最小和最大距离
  6. 执行计划 分析一条sql语句的效率 mysql_MySQL中一条SQL语句的执行过程
  7. 科普:Windows下Netcat使用手册
  8. 调用内部类里,在静态类中调用动态方法的问题
  9. 机器学习基石第十三讲笔记
  10. 简单梳理RAID算法
  11. 【编译原理】 CS143 斯坦福大学公开课 专栏总揽
  12. Zookeeper客户端Curator使用
  13. 【看表情包学Linux】插叙:实现简易的 Shell | 通过内建命令实现路径切换 | 再次理解环境变量
  14. 分部积分法的快速运算:表格法
  15. cae属于计算机技术吗,CAE、CAD、CAPP与CAM的区别——扫盲贴
  16. Rosalind全排列的问题
  17. 【idea】如何设置默认的JDK
  18. 诚迈科技智能汽车软件产业峰会落幕,智达诚远峰昇操作系统FusionOS发布!
  19. 全宇宙最全的bash 脚本常见用法总结!
  20. 两百条微信小程序开发跳坑指南(不定时更新)

热门文章

  1. 排队接水(信息学奥赛一本通-T1319)
  2. 信息学奥赛C++语言: 跑步
  3. python的os模块使用_Python学习笔记之os模块使用总结
  4. python函数执行shell_6方法,python中执行shell命令
  5. python selenium_自动化测试:Selenium+Python环境搭建
  6. 操作系统(李治军) L12内核级线程的实现
  7. TypeScript接口
  8. DreamweaverCS4搭建配置php本地站点(图文教程)- 教程篇
  9. filter滤镜实现img图片的CSS蒙版效果、模糊效果
  10. 门户网站新闻资讯整站打包带全自动采集