随笔分类 -  Magento 1

magento 1.9 with nginx frontend and REST API 404
摘要:location /api { rewrite ^/api/rest /api.php?type=rest last; rewrite ^/api/v2_soap /api.php?type=v2_soap last; rewrite ^/api/soap /api.php?type=soap la 阅读全文

posted @ 2017-09-19 14:29 冯亮 阅读(399) 评论(0) 推荐(0)

get customer attribute option
摘要:Mage::getResourceSingleton('customer/customer')->getAttribute('gender')->getSource()->getAllOptions() 阅读全文

posted @ 2017-08-13 18:00 冯亮 阅读(118) 评论(0) 推荐(0)

magento paypal测试配置
摘要:1、登录https://developer.paypal.com 2、在https://developer.paypal.com/developer/accounts/中创建 阅读全文

posted @ 2017-07-18 18:53 冯亮 阅读(248) 评论(0) 推荐(0)

身份证号
摘要:Validation.add('validate-identify', '无效的身份证号', function(v) { var regIdCard=/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1... 阅读全文

posted @ 2017-07-07 12:01 冯亮 阅读(349) 评论(0) 推荐(0)

创建新属性集
摘要:$entityTypeId = Mage::getModel('catalog/product') ->getResource() ->getEntityType() ->getId(); /* @var $attributeSet Mage_Eav_Model_Entity_Attribute_Set */ $attributeSet = Mage::getModel... 阅读全文

posted @ 2017-07-04 11:28 冯亮 阅读(153) 评论(0) 推荐(0)

Magento1.9 add attribute to catalog product & assign to all attribute set general group
摘要:$installer = $this; $attributes = array( 'region' => array( 'type' => 'int', 'input' => 'select', 'source_model' => 'evebit_catalog/entity_attribute_source... 阅读全文

posted @ 2017-05-25 17:13 冯亮 阅读(183) 评论(0) 推荐(0)

Finding the Right EAV Attribute Table
摘要:$customer = Mage::getModel('catalog/product');$entity = $customer->getResource();$attribute = Mage::getSingleton('eav/config')->getCollectionAttribute 阅读全文

posted @ 2017-02-20 09:39 冯亮 阅读(133) 评论(0) 推荐(0)

Finding the Right EAV Attribute Table
摘要:$customer = Mage::getModel('catalog/product');$entity = $customer->getResource();$attribute = Mage::getSingleton('eav/config')->getCollectionAttribute 阅读全文

posted @ 2017-02-17 17:30 冯亮

magento添加系统sections配置时应注意的事项
摘要:(1)只有在新增sections是需要增加对应的acl配置,这个配置可以放在config.xml中或者放在adminhtml.xml中 阅读全文

posted @ 2016-11-29 17:41 冯亮 阅读(219) 评论(0) 推荐(0)

让magento的validate验证hidden field
摘要:Object.extend(Validation, { isVisible : function(elm) { return true; }, insertAdvice : function(elm, advice){ // advice contains the div that would no 阅读全文

posted @ 2016-08-15 12:32 冯亮 阅读(426) 评论(0) 推荐(0)

magento后台登陆后,没任何提示,又跳转到登陆页面
摘要:这个问题通常是cookie配置的问题。需要去将core_config_data中web/cookie/cookie_path、web/cookie/cookie_domain设为null 阅读全文

posted @ 2016-04-19 17:54 冯亮 阅读(280) 评论(0) 推荐(0)

magento后台登陆404、Front controller reached 100 router match iterations的解决方案
摘要:(1)执行如下sql 阅读全文

posted @ 2016-04-19 17:51 冯亮 阅读(560) 评论(0) 推荐(0)

magento产品导入时需要注意的事项
摘要:(1) 必须保证csv文件是utf-8编码的。非utf-8的编码会导致产品导入失败 (2)产品图片 (a) 产品图片必须包含image,image_label,_media_image,_media_lable,_media_position,_media_is_disabled,thumbnail 阅读全文

posted @ 2016-04-18 17:10 冯亮 阅读(195) 评论(0) 推荐(0)

magento url rewrite
摘要:Magento 设置 Rewrite Url 方法。 1、apache 要加载 Rewrite 扩展模块。2、网站根目录要有 .htaccess 文件。3、Magento 后台要设置启用 Rewrite Url 有效。 4、(注意:重要)经常有人忘记了这个步骤。 请参照下面的设置: vi /etc/ 阅读全文

posted @ 2016-04-01 12:26 冯亮 阅读(481) 评论(0) 推荐(0)

通过属性集名称获取属性集id
摘要:Mage::getModel('eav/entity_attribute_set')->load('属性集名称', 'attribute_set_name')->getAttributeSetId(); 阅读全文

posted @ 2015-02-07 11:37 冯亮 阅读(227) 评论(0) 推荐(0)

Item with the same id "98" already exist
摘要:在magento项目中多次遇到这样一个错误:Item (Bluecom_Onefieldusername_Model_Customer) with the same id "98" already exist解决方案:(1) 新建一个类,必须继承Varien_Objectclass Mypackag... 阅读全文

posted @ 2014-11-24 14:27 冯亮 阅读(355) 评论(0) 推荐(0)

调magento自定义模板发邮件
摘要:1. 设置邮件模板 ActiveCodeline custom email module activecodeline_custom_email1.html html ... 阅读全文

posted @ 2014-11-10 15:30 冯亮 阅读(1156) 评论(0) 推荐(0)

剖析magento中关于Email模板的设置
摘要:public function send() { $emailTemplate = Mage::getModel('core/email_template'); // Send all emails from corresponding list while (!empty($this->_emai... 阅读全文

posted @ 2014-08-19 19:10 冯亮 阅读(819) 评论(0) 推荐(0)

在magento中发邮件
摘要:1. 在system->Configuration->Store Email Addresses中设置General Contact的Sender Name、Sender Email。 Sender Name是邮件的发件人,Sender Email是发件人的邮件地址2. 在system->Conf... 阅读全文

posted @ 2014-08-19 18:58 冯亮 阅读(3129) 评论(0) 推荐(0)

magento中的各种form标签
摘要:1. Text Field $fieldset->addField('title', 'text', array( 'label' => Mage::helper('form')->__('Title3'), 'class' => 'required-entry', 'required' => tr... 阅读全文

posted @ 2014-07-25 16:48 冯亮 阅读(1326) 评论(0) 推荐(0)

导航