【发布时间】:2015-11-02 15:43:49
【问题描述】:
我有以下代码,可让我在商店的首页上显示具有“特色”属性的产品。
$_productCollection=Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addAttributeToFilter('is_featured', 1)
->addAttributeToFilter('status', 1)
->joinField('value','catalog_product_entity_tier_price','value', 'entity_id=entity_id','{{table}}.website_id='.$storeId, 'left')
->setPageSize(9)
->setStoreId($storeId)
->addStoreFilter($storeId);
问题是,我需要能够显示产品评级($this->getReviewsSummaryHtml($_product, 'short') 在我的正常类别列表中)
如何将数据添加到集合中以供我使用:
if($_product->getRatingSummary()):
echo $this->getReviewsSummaryHtml($_product, 'short')
endif;
【问题讨论】:
标签: php magento magento-1.7