0
我使用下面的代碼過濾用顏色屬性來配置產品顏色屬性,但它給空數組的Magento ::如何通過過濾器在Magento
$visibility = array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
);
$cur_category=Mage::getModel('catalog/category')->load($cat_id);
$_productCollection= Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('visibility', $visibility);
$_productCollection->addAttributeToFilter('color', 146);
請告訴我