![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
magento 领悟
小画家~
这个作者很懒,什么都没留下…
展开
-
magento
1、快捷格式化商品价格:帮助1echoMage::helper('core')--->currency($product->getPrice());?>2、格式化时间:帮助12345原始日期: echo $timeLapseBegin?>转载 2014-10-22 16:36:14 · 549 阅读 · 0 评论 -
Magento日期相关方法
Magento日期相关的方法主要在两个文件中。一个是core/date模型类,另外一个是core核心助手类。包含的相关方法如下。1,core/date,主要的方法就是date,实际上就是简单对PHP中date()函数的封装。定义如下。/*** Converts input date into date with timezone offset* Input date must转载 2014-10-11 15:21:18 · 455 阅读 · 0 评论 -
通过Ajax修改PHP全局变量$_POST MAGENTO
jQuery.post(action, {name: jQuery('#name').val(),email: jQuery('#email').val(),telephone: jQuery('#telephone').val(),comment: jQuery('#comment').val(),recaptcha_challenge_field: jQuery('#rec转载 2014-10-11 16:35:32 · 700 阅读 · 0 评论 -
Magento任意页面添加Contact Us表单
Magento默认包含Contact Us联系我们表单,在完成安装之后就有一个CMS页面中包含一个联系我们的表单可以供用户使用。那么假如说我们需要在其它的CMS页面当中添加一个新的表单该如何操作呢?实际上,在Magento任意页面添加Contact Us联系我们表单相当简单,可以通过如下步骤进行。登录管理后台CMS -> Pages新建或选择需要添加联系表单的CMS页面赋值如下代码到编原创 2014-10-11 17:53:28 · 1907 阅读 · 0 评论 -
Magento的几个常用调试代码
Magento模板开发,经常会用到的几个方法和函数实例化一个类,创建个Magento对象1$note_obj=new Mage();getSingleton方法1objInfo($note_obj->getSingleton('catalog/session'));转载 2014-10-31 17:15:34 · 988 阅读 · 0 评论 -
什么叫 EAV 模式 $order->getId()
其实简单的讲 EAV 模式 涉及 这几张表:原创 2014-11-03 11:11:27 · 1460 阅读 · 0 评论 -
MAGENTO couponcode 多维数组过滤
$coupon = Mage::getModel('salesrule/rule')->load(1); echo ''; print_r($coupon->getData()); echo '';原创 2015-01-04 17:51:57 · 546 阅读 · 0 评论 -
magento - 得到订单各种货币下,换算成USD 的订单总额
$_sub = order->getGrandTotal();$orderCurrency = $order->getData('order_currency_code');$currency_rate = $currency->load('USD')->getAnyRate($orderCurrency);$amount = $_sub / $curren转载 2014-12-24 10:40:14 · 685 阅读 · 0 评论 -
magento 常用插件
一个聚合帖子,希望能够对那些在寻找的人有帮助。Magento一些实用插件,Magento常用插件整理:挺有用的53. 全页缓存插件一:Lesti::FpcURL:http://www.magentocommerce.com/magento-connect/lesti-fpc-4534.htmlKEY:http://connect20.magentocommerce.com/commu转载 2015-01-05 10:19:20 · 1730 阅读 · 0 评论 -
Magento给新产品页面添加分页
本文介绍如何让magento创建一个带分页功能的新到产品页面,方便我们在首页或者其它CMS Page调用和展示新到产品。在Magento我们经常有的做法是建立一个可以调用新产品的block,然后通过:{{block type="catalog/product_new" column_count="6" products_count="100" name="home.catalog.prod转载 2015-01-06 10:54:50 · 890 阅读 · 0 评论 -
magento Change The Image Path
http://www.magentocommerce.com/magento-connect/change-the-image-path.html原创 2015-03-10 16:42:37 · 354 阅读 · 0 评论 -
Magento的URL重写问题
问题背景: 1. 在发布网站前,由于粗心,将产品目录A的URL:http://xxx.xxx.com/AA.HTML 写成了http://xxx.xxx.com/AA1.HTML。就这样,网站正式发布了。 2. 在发布网站后,发现URL有问题,就进行修改。 即将http://xxx.xxx.com/AA1.HTML修改为http://xxx.xxx.com/AA.H转载 2015-06-05 11:55:35 · 863 阅读 · 0 评论 -
Magento数据库多表联查之join
public function getOrderCollection() { $orders= Mage::getModel('sales/order')->getCollection(); $orders->getSelect() ->join( array('itemz'=> Mage::getSingleton('cor原创 2014-10-11 16:36:34 · 1184 阅读 · 0 评论 -
获取Magento域名及图片,JS路径方法 magento
使用Mage核心类提供的方法,可以在系统人任意地方调用下列方法,获取Magento所在服务器的域名,以及当前magento安装的图片,js,css路径。转载 2014-10-11 16:26:53 · 1132 阅读 · 0 评论 -
Magento 通过属性获取产品和目录
Magento 通过属性获取产品和目录在这一章节里, 我们来了解如何轻松的利用 Collection 来通过某一个属性(Attribute)获取产品(Product)和目录(Category) 通过 SKU 获取产品 Load a Product by SKU SKU 不像其他产品属性, 它是一个静态属性, 这就意味着它不会被存储在任何一个产品 EAV 表中, 而存储在转载 2014-10-22 19:31:16 · 517 阅读 · 0 评论 -
magento速度优化,magento数据库优化瘦身
magento本身会记录很多日志,这些日志长年累积会占用非常大的空间。下面是一些日志表 ’dataflow_batch_export’, ’dataflow_batch_import’, ’log_customer’, ’log_quote’, ’log_summary’, ’log_summary_type’, ’log_url’, ’log_url_in转载 2014-10-24 10:41:30 · 1164 阅读 · 0 评论 -
magento修改订单状态、添加订单备注代码示例
magento修改订单状态、添加订单备注代码示例 Order API状态: Resource Name:sales_order Aliases: .order Methods: sales_order.list-Retrieve list o转载 2014-10-23 17:35:24 · 934 阅读 · 0 评论 -
magento 增加一个layout template// Magento 常用技巧与方法
magento 增加一个layout template博客分类:WP / Joomla! / Magento / Shopify / Drupal / Moodle / Zimbra magento默认的有5中layout template方式,分别为:empty1columns2columns-left2columns-right3columns转载 2014-10-23 17:40:16 · 738 阅读 · 0 评论 -
获取Magento用户登陆状态
获取Magento用户登陆状态作者:【鹏程万里】 日期:2011-06-18用户登陆状态判断,Magento早封装好了:1if ($this->helper('customer')->isLoggedIn()) {2 // is logon3}转载 2014-10-23 16:52:33 · 487 阅读 · 0 评论 -
Magento订单状态迷思
Magento订单状态迷思01require_once('app/Mage.php');02umask(0);03Mage::app('default');04 05$order = Mage::getMod转载 2014-10-23 16:46:59 · 850 阅读 · 0 评论 -
今天 发现了 一个 推酷 站,总结了些知识,希望大家学习
http://www.tuicool.com/topics/11450042?st=1&lang=1 推酷原创 2014-10-27 13:53:37 · 467 阅读 · 0 评论 -
Magento getModel getSingleton等常用函数说明
Mage::getModel函数详解:在通常的PHP初始化类对象的时候,使用以下方式进行生成。$modelSales = new ModelSales();但是在magento中初始化模型对象时候,使用以下的方式进行生成模型对象。$product = Mage::getModel(’catalog/product’);我们阅读magneto系统核心代码,发现在执行Mage:转载 2014-10-09 11:40:37 · 784 阅读 · 0 评论 -
Magento : 直接下载扩展插件到本地 Extension
Magento : 直接下载扩展插件到本地 Extension博客分类:WP / Joomla! / Magento / Shopify / Drupal / Moodle / ZimbraJavascript /Jquery / Bootstrap / WebDownload Magento Extension使用下面的链接下载插件。然后上传也可以。http://转载 2014-10-09 11:53:33 · 800 阅读 · 0 评论 -
magento 设置全局变量或函数 (Session, Registry 和 Function)
magento 设置全局变量或函数 (Session, Registry 和 Function)博客分类:WP / Joomla! / Magento / Shopify / Drupal / Moodle / Zimbra 1. Magento: Get and set variables in session To set a Magento session转载 2014-10-09 11:55:48 · 1043 阅读 · 0 评论 -
MAGENTO config FLAG 配制获取、同时 一维数级转二维数组概念
获取某项配置的值:$store->getConfig($path) 或者 Mage::getStoreConfig($path [, $store]);$store 这个变量可以是 store 的 code或ID 获取某项配置是否不为空,返回值为 true / false:Mage::getStoreConfigFlag($path [, $store]);$store 这原创 2014-10-11 11:40:53 · 651 阅读 · 0 评论 -
Magento中直接使用SQL语句 select insert update
在做开发时有的时候迷惑,Magento都提供了数据的对象,那该如何查询自定义的SQL语句呢.其实Magento已经想过这个问题了.只需instance core/resource的对象进行connect就能得到数据访问的对象了.语法是跟Zend_Db一致的.看代码:<?php//select query$read = Mage::getSingleton('core/resource')转载 2015-06-09 15:58:43 · 1090 阅读 · 0 评论