开发

Magento Admin Form表单元素大全

开发Magento后台的时候经常用到表单(Varien_Data_Form),下面是所有表单元素的添加方法: 1.input type=”text” $fieldset->addField(‘title’, ‘text’, array( ‘label’     => Mage::helper(‘form’)->__(‘Title3′), ‘class’     => ‘required-entry’, ‘required’  => true, ‘name’      => ‘title’, ‘onclick’ => …Read the Rest

给Magento的review模块增加字段

需要给自己的站review form增加一个email字段和reply字段.为了自己以后查找,特别记录下: 首先是手工增加字段,直接在review下增加就好. 由于我用的是Magento1.6,所以下面代码部分位置可能稍微有点不一样. Review/Model/Resource/Review.php protected function _afterSave(Mage_Core_Model_Abstract $object) { $detail = array( ‘title’ => $object->getTitle(), ‘detail’ => $object->getDetail(), ‘nickname’ …Read the Rest

高级应用Magento-订单创建流程及程序代码

老规矩,直接看代码吧。下面的代码是如何通过程序创建一个完美订单。 < ?php require_once 'app/Mage.php'; Mage::app('default');//初始化程序,设置当前店铺 $store = Mage::app()->getStore(‘default’); //通过电子邮件获取用户,当然也可以不获取,创建guest订单 $customer = Mage::getModel(‘customer/customer’); $customer->setStore($store); $customer->loadByEmail(‘email_address@gmail.com’); //初始化Quote,Magento的订单是通过Quote来转化过去的 $quote = Mage::getModel(‘sales/quote’); $quote->setStore($store); …Read the Rest

Magento常用的SQL命令集合

以下所有命令仅供参考,不同版本,不同时间,可能数据略有不同,慎用! 1. 导出导入 Magento 所有分类和产品 分类和产品是存放在以 catalog 开头的所有表中,对这组表进行导出导入即可实现此功能。 导入分类产品的 SQL 文件前注意: 在首行加入:SET FOREIGN_KEY_CHECKS=0; 在末行加入:SET FOREIGN_KEY_CHECKS=1; 原因是 Magento 使用 Innodb 存储引擎。 …Read the Rest

初始化magento产品id

magento产品的id都是自增长的. 由于测试会使其id变化… 数字大了之后,会对产品索引产生影响.建议测试完之后,初始化其id 可以直接在phpmyadmin中操作catalog_product_entity这张表.

修改”ship to this address”为默认值.

最近在做onepage的优化.ship to this address这个单选框,我一直以为是在theme里面改.. 搞了半天.要在core里面改.. 下面是代码: public function isUseBillingAddressForShipping() { if (($this->getQuote()->getIsVirtual()) || !$this->getQuote()->getShippingAddress()->getSameAsBilling()) { return false; } return true; …Read the Rest

修改magento review page tile时发生的奇怪问题

由于review page是单独的一个页面.而且title和product page的title是一样的. 所以,我今天就进行review page title的改造.. 由于不想影响系统以后的升级,我把core下的产品控制器放到了local下面. …但是奇怪的事情发生.. 怎么改.. 怎么刷新缓存..我的修改也不生效.. 就算是加入die();也不生效..于是怀疑是控制器已经被重写了的. 然后我直接修改的core… 生效了.. 奇怪的问题啊… 感谢松菊花的修改协助…

magento获取当前商店名

在前面讲magento的多店配置的时候,简单讲了下websitename,store和store view的区别. 后面就有朋友问我如何获取当前界面的值.下面是代码: 获取store的id: < ?php echo Mage::app()->getStore()->getId(); ?> 知道了第一个,其他也就简单了.下面是获取当前store view name的值: < ?php echo Mage::app()->getStore()->getName(); ?> ->getGroup()->getName()不多说: < ?php …Read the Rest

Magento1.6的一些说明

所有的扩展不需要任何更改都可以运行在magento1.6上.并且magento可以运行在各种RDBMS(关系型数据库)上,不单单只支持mysql了

使Magento的层导航对搜索引擎更友好

由于自己的站用了大量的属性过滤功能.虽然这样做,用户体验非常的好.但是,牺牲了seo的性能.

首先是层导航页面的url并不友好.再次是层导航页面的meta等信息也不好书写..

url的问题.发现可以使用插件实现. 下面的文章,是我google以后,发现已经解决的问题.

TOP Online Store
1.Girls' Generation, a Fantasy Jewelry online Store. Nobody Can Keep Away From the Beauty:tiffany ca 2.China Wholesale Electronics:China Wholesale Electronics 3.The android phone is best:Android sale.The Android Ice cream sandwich well be best Android OS. 4.R4 3DS for sale:R4 ds shops,and support Japanese R4:R4 販売. 5.fashion bag:armani watches and MBT shoes.
R4 V1.4.2 and your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 can not work on it.
Please update your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 card with this patch. Please read readme.txt attached firstly.Just do as the procedures listed in readme.