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);
请告诉我