0
我試圖Magento中獲得的所有可用的產品系列&過濾該集合如何addAttributeToFilter?
這裏是我的代碼:
$searcher = Mage::getModel('catalog/product')->getCollection();
$searcher->addAttributeToSelect('name');
echo count($searcher);
$searcher->addAttributeToFilter('name',array('like' => 'paper'));
$searcher->load();
echo count($searcher);
現在第一次給數745(適用於所有產品),但過濾後仍然顯示745.
好肯尼我正在嘗試這個&給你答案。非常感謝您的快速回復。 – Kaushal
請查看此鏈接「http://eagle.arvixe.com/~houselav/index.php/catalogsearch/advanced/result/?name=paper&description=&short_description=&sku=&price[from]=&price[to]=」。 – Kaushal
在所有標籤下有745745.第一個745在過濾之前,然後在過濾之後。 – Kaushal