【发布时间】:2011-11-10 13:54:25
【问题描述】:
我需要根据特定标签对 productCollection 进行自定义过滤。 所以让我们假设我有以下 productCollection:
<pre>
$collection_featured_products = Mage::getModel('catalog/product')->getCollection()
->addCategoryFilter(Mage::registry('current_category'))
->addAttributeToSelect('*')
->addAttributeToFilter('featured_product', 1);
</pre>
或产品列表页面中的 productCollection:
$_productCollection = $this->getLoadedProductCollection() ->addAttributeToSelect('位置'); $_helper = $this->helper('目录/输出'); 如何按特定标签添加过滤器以获取包含该标签的所有产品。 如果我无法在 productCollection 中过滤,也许我可以加入标签表?!如果属实,请举例。PS:如果你需要。我有 Magento 版本。 1.5.0.1
感谢补充!
【问题讨论】:
标签: magento