http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/using_collections_in_magento
class Mage_Catalog_Model_Resource_Product_Collection extends Mage_Catalog_Model_Resource_Collection_Abstract
-
class Mage_Catalog_Model_Resource_Collection_Abstract extends Mage_Eav_Model_Entity_Collection_Abstract
-
Mage_Eav_Model_Entity_Collection_Abstract
/**
* Add attribute filter to collection
*
* If $attribute is an array will add OR condition with following format:
* array(
* array('attribute'=>'firstname', 'like'=>'test%'),
* array('attribute'=>'lastname', 'like'=>'test%'),
*)
*
* @see self::_getConditionSql for $condition
* @param Mage_Eav_Model_Entity_Attribute_Interface|integer|string|array $attribute
* @param null|string|array $condition
* @param string $operator
* @return Mage_Eav_Model_Entity_Collection_Abstract
*/
public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner')
解決方案:
$collection->addAttributeToFilter(
array(
array(
'attribute' => 'ean',
'neq' => '',
),
array(
'attribute' => 'upc',
'neq' => '',
),
),
array(
'attribute' => 'jan',
'neq' => '',
),
)
);
您的解決方案工作,塔NKS! – 2012-08-06 16:16:09