码迷,mamicode.com
首页 >  
搜索关键字:mage    ( 104个结果
magento获取当前栏目ID号与栏目名称函数
Magento获取当前栏目ID:$_cat= new Mage_Catalog_Block_Navigation();$curent_cat= $_cat->getCurrentCategory();$curent_cat_id= $curent_cat->getId(); 或者Mage::regi...
分类:其他好文   时间:2014-08-21 18:40:14    阅读次数:172
magento 获得root categories
$root_id = Mage::app()->getStore()->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCategories($root_id);获得分类名称 fore...
分类:其他好文   时间:2014-08-21 14:58:04    阅读次数:210
剖析magento中关于Email模板的设置
public function send() { $emailTemplate = Mage::getModel('core/email_template'); // Send all emails from corresponding list while (!empty($this->_emai...
分类:其他好文   时间:2014-08-19 20:42:15    阅读次数:184
magento 获得产品的Thumbnail,SmallImage和BaseImage
$thumb_path = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getThumbnail()); $small_path...
分类:其他好文   时间:2014-08-11 20:35:32    阅读次数:312
magento 获得自定义产品属性的属性值
1 $_product->getResource()->getAttribute('my_attribute_name')->getFrontend()->getValue($_product);注:在列表页获得的产品可能信息不全,需要获得产品id之后,使用 1 $_product = Mage:....
分类:其他好文   时间:2014-08-11 14:55:12    阅读次数:205
magento 获得子分类的链接,名称和图片
$subcategories = Mage::getModel('catalog/category')->getCategories($current_category_id);foreach($subcategories as $cat){$cat->getName();//名称Mage::hel...
分类:其他好文   时间:2014-08-06 18:45:51    阅读次数:201
magento中取不同store中的产品数据
$products = Mage::getResourceModel('catalog/product_collection') ->setStoreId($storeId) ->addStoreFilter($storeId) ->addAttributeToSelect(...
分类:其他好文   时间:2014-07-28 11:31:40    阅读次数:178
magento sweet积分插件 获得订单消耗的积分
$order_object=Mage::getModel('sales/order')->load("order_id");注:order_id 是订单号后面的数字;$res['points_spend']=Mage::helper('rewards')->getPointsString($orde...
分类:其他好文   时间:2014-07-26 00:31:26    阅读次数:195
magento中的各种form标签
1. Text Field $fieldset->addField('title', 'text', array( 'label' => Mage::helper('form')->__('Title3'), 'class' => 'required-entry', 'required' => tr...
分类:其他好文   时间:2014-07-26 00:21:36    阅读次数:391
magento CURD操作
查询:$model = Mage::getModel('mynews/mynews'); $collection = $model->getCollection(); $collection->addAttributeToSelect(array('name', 'image', 'url_key'...
分类:其他好文   时间:2014-07-25 23:51:50    阅读次数:352
104条   上一页 1 ... 8 9 10 11 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!