public function get_random_same_cate_products() { $_product = $this->getProduct(); $categoryIds = $_product->getCategoryIds(); if(count($categoryIds) ){ foreach ($categoryIds as $cid) { $_category = Mage::getModel('catalog/category')->load($cid); if ($_category->getLevel() == 3) { $_productCollection = Mage::getModel('catalog/product') ->getCollection() ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left') ->addAttributeToSelect('*') ->addAttributeToFilter('category_id', array( array('finset' => $cid), ) ) ->addAttributeToFilter('type_id','configurable') ->addAttributeToFilter('sku',array('neq'=>$_product->getSku())); $_productCollection->getSelect()->order(new Zend_Db_Expr('RAND()')); $_productCollection->setPage(1, 4); return $_productCollection; } } } }
相关推荐
Magento列表页面属性筛选,实现URL静态化展示,eg:http://***.com/shopby/color/1/design/2/...
magento数据结构分析 magento数据字典
演示地址:http://olegnax.com/product/athlete-responsive-magento-theme/livepreview/ Athlete Magento主题,兼容Magento 1.9.x, 1.8.x, 1.7.x ,特点:完全自适应(响应式布局),自定义子主题,无限颜色,完全...
magento2-简单产品饲料一个简单的Magento 2产品Feed示例目的是创建一个简单的产品Feed,以探索Magento 2。
featuredproduct1.1_magento1.4-1.5.zip Magento Featured Category推荐分类
magik shoes magento 模板, magento 1.7 模板
magento的SMTP插件magento的SMTP插件magento的SMTP插件
Do you have a good product to sell but need a way for your start-up to sell it to your potential customers the right way? Were you unhappy with what Magento 1 had to offer and are looking forward to ...
深入理解Magento 由精东博客下载下来制作成pdf
Magento插件开发手册 Magento Extension Developers Guide
Magento Magento商城 Magento目录结构
magento2 developers cookbook, magento 开发手册,magento教程
Chapter 1, Installing Magento 2 on Apache and NGINX, is a totally different ballgame compared to Magento 1. Where Magento 1 could be installed through FTP or SSH, Magento 2 is installable only via the...
主要包括的内容有:magento的常用设置、Magento模板制作教程、Magento商城_目录结构说明、Magento中文教程实用文档、常用的xml的文件的作用以及自定义模块的应用
magento插件
redis magento
快速在服务器上复制为另一个站,版本用的是magento,php语言
Magento 的配置系统就像是 Magento 的心脏,支撑着 Magento 的运行。这套 配置系统掌管着几乎所有“module/model/class /template/etc”。它把整个 Magento 系统抽象出来,用一个配置文件来描述。这里的“配置文件”...
magento用户使用手册
magento转移服务器magento建立多站点总结