随笔分类 - magento
摘要:网址:http://www.ruiwant.com/magento-for-dev-part-7-advanced-orm-entity-attribute-value.html
阅读全文
摘要:Magento支持在模块中创建、删除、更新数据库表及字段。通过该方式,在插件开发的过程中,添加和修改字段变成了一件非常轻松的事情。只需要修改模块的版本号,同时在文件中添加一个符合命名规则的脚本就可以了。假如当前Magento模块是Ruiwant_Rewards,版本号是0.9.0,我们想在该模块中,...
阅读全文
摘要:参考网址:http://www.ruiwant.com/magento-for-dev-part-5-magento-models-and-orm-basics.html
阅读全文
摘要:1.http://www.ruiwant.com/
阅读全文
摘要:步骤:1.创建一个Hello World模块2.为这个模块配置路由3.为这个模块创建执行控制器创建Hello World模块创建模块的结构目录:app/core/local/Sjolzy/HelloWorld/Blockapp/core/local/Sjolzy/HelloWorld/control...
阅读全文
摘要:_init();}protected function _init(){$this->_store=Mage::app()->getStore();$this->_baseUrl=Mage::getBaseUrl();}public function getAllCategory(){$parent...
阅读全文
摘要:步骤 I. 加一个occupation/title字段到用户注册页,差不多在register.html的54行,在email下方加一个Occupation显示代码代码:__('Email Address') ?> *htmlEscape($this->getFormData()->getEmail(...
阅读全文
摘要:第一步、新建一个模块,在app/etc/modules/目录下新建文件Shuishui_Customer.xml true community 第二步、新建这个模块的config配置文件,位置在app/code...
阅读全文
摘要:1.加载某个attribute: $attributeCode=Mage::getModel('catalog/resource_eav_attribute') ->load($attrbuteId) ->getData("attribute_code")...
阅读全文
摘要:1. 地址保存 $_custom_address = array ( 'firstname' => 'Branko', 'lastname' => 'Ajzele', 'street' => array ( '0' => 'Sample address part1',...
阅读全文
摘要:magento判断用户登录Magento 登陆之后返回登录之前的页面magento 在登陆后一般会自动跳转到 My Account 页面但是经常会有需求 就是登陆自动跳转到 之前的页面里面工具/原料php+mysql+apache方法/步骤只要加代码Mage::getSingleton('custo...
阅读全文
摘要:查:$read = Mage::getSingleton("core/resource")->getConnection('core_read');$sql = "select * from `abc`"; $result = $read->fetchAll($sql); //fetchRow查找一...
阅读全文
摘要:So it turns out the problem was that Apache didn't have write permissions to theWEBROOT/vardirectory, so Magento was using its cache from the system/t...
阅读全文