Magento去掉价格的小数点
magento的默认情况,价格后面是有小数点的,我们来看下如何正确的来去掉小数点。
1.复制如下路径的文件 app/code/core/Mage/Directory/Model/Currency.php 到 app\code\local\Mage\Directory\Model\ 文件夹下面,这个文件夹没有自己手动创建下。
2.打开新复制的这个文件 Currency.php
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false) { return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets); }public function format($price, $options=array(), $includeContainer = true, $addBrackets = false) { return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets); }3.刷新magento缓存,去前台页面看下,小数点应该去掉了。转载表明出处:www.hellokeykey.com
Magento去掉价格的小数点的更多相关文章
- Magento的价格去掉小数点
Magento的默认情况,价格后面是有小数点的,我们来看下如何正确的来去掉小数点. 1.复制如下路径的文件 app/code/core/Mage/Directory/Model/Currency.ph ...
- magento 去掉index.php .html
首先应该确保你的服务器环境,达到了magento的运行需求,若你是使用的是magento专用空间就不必担心了,若不是请查看我以前的文章,检测你的运行环境(http://www.hellokeykey. ...
- magento去掉小数点后面的0
<?php echo $_product->getPrice()?> PHP number_format() 函数 <?php echo number_format($_p ...
- magento去掉add to cmpre和email to friend
修改:\app\design\frontend\default\blanco\template\catalog\product下list.phtml 和app\design\frontend\defa ...
- magento 常用的函数
1.Magento eav_attribute表中source如何指定自定义数据来源 如果你引用的类名为yebihai_usermanage_model_entity_school你必须完整的给出地 ...
- Magento笔记/记录(1)
1.Magento eav_attribute表中source如何指定自定义数据来源 如果你引用的类名为yebihai_usermanage_model_entity_school你必须完整的给出地 ...
- MySQL学习笔记(1/2)
数据库的学习要求:1.为项目设计表:2.使用SQL(Structure Query Language)语句(SQL编程).其他的都可以使用工具完成. SQL: DDL:创建库.创建表 DML:对数据的 ...
- 【转】关于Oracle将小于1的数字to_char后丢掉0的解决办法
SQL代码如下: select rtrim(to_char(0.11, 'fm9990.99'), '.') from dual; 其中0.11为需要to_char的数字fm去掉字符串前面的空格999 ...
- Android WebView 向上向下滑动监听
在手势的 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {}代码 ...
随机推荐
- BZOJ1770 : [Usaco2009 Nov]lights 燈
设$f[i]$表示$i$点按下开关后会影响到的点的集合,用二进制表示. 不妨设$n$为偶数,令$m=\frac{n}{2}$,对于前一半暴力$2^m$搜索所有方案,用map维护每种集合的最小代价. 对 ...
- tableviewCell折叠状态2
// // LHQContentViewCell.h // 11 - 投资管理 - 李洪强 // // Created by vic fan on 16/4/12. // Copyright ...
- C++ sort vector<vector<int> > or vector<MyClass> 容器的排序
C++的STL中提供了很强大的排序函数sort,可以对任意数组,结构体及类进行排序,下面我们先来看最简单的数组排序.默认的升序排列,我们也可以在后面加上less或greater来告诉编译器我们想要的排 ...
- [Delphi]Delphi开发的一些技巧
一.提高查询效率先进行准备查询操作: CustomerQuery.Close; if not (CustomerQuery.Prepared) then -->查询是否已准备好 Customer ...
- 更新AD对象属性值
1. 对于Set-ADUser不包含的对象属性,可以采用replace来操作 Set-ADUser -Identity 'UserA' -Replace @{userWorkstations = 'C ...
- POJ 3254 Corn Fields(状压DP)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13732 Accepted: 7216 Desc ...
- 动态input file多文件上传到后台没反应的解决方法!!!
其实我也不太清除具体是什么原因,但是后面就可以了!!! 我用的是springMVC 自带的文件上传 1.首先肯定是要有springMVC上传文件的相关配置! 2.前端 这是动态input file上传 ...
- python 操作excel 使用笔记
写入excel, 保存的过程中需要注意,保存格式xls后缀,如果用xlsx会报错 def set_style(name,height,bold=False): """&q ...
- pdfkit安装使用
centos 安装pdfkit1.先安装pdfkit依赖包 wkhtmltopdf 安装方式: # wget http://download.gna.org/wkhtmltopdf/0.12/0.12 ...
- js判断时间差
//var startDate = "2015-09-09"; //var endDate = "2015-09-08"; var startDate = &q ...