04 2014 档案

Colorbox cannot load the image added by js
摘要:As we know, Colorbox is a wonderful js plugin. I came up against a head-banged problem in v1.5.6. When I add some images to the group, Colorbox cannot... 阅读全文

posted @ 2014-04-14 00:14 冯亮 阅读(221) 评论(0) 推荐(0)

deal with 'non-admin area' warn
摘要:We usually use the follow code to delete product in Magento$product = Mage::getSingleton('catalog/product')->load($productId);$product->delete();Of course, you are given a warn from magento. To solve this problem, you should add the follow code before and after delete Mage::register(&# 阅读全文

posted @ 2014-04-12 19:53 冯亮 阅读(174) 评论(0) 推荐(0)

How to use pagination in Magento
摘要:classYour_Module_Block_Entityname_ListextendsMage_Core_Block_Template{ protected function _construct(){ // We get our collection through our model parent::_construct(); // Instantiate a new Pager block $this->_entities =Mage::getModel('your_module/entityname')->getCollecti... 阅读全文

posted @ 2014-04-12 17:13 冯亮 阅读(221) 评论(0) 推荐(0)

Magento - get Attribute Options of the dropdown type attribute
摘要:$attribute_code = "color"; $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code); $options = $attribute_details->getSource()->getAllOptions(false); Foreach($options as $option){ echo $option["value"]; 阅读全文

posted @ 2014-04-08 21:55 冯亮 阅读(401) 评论(0) 推荐(0)

导航