$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect(['entity_id'])
->addAttributeToFilter(
array(
array('attribute'=> 'pricegroup','null' => true),
array('attribute'=> 'pricegroup','eq' => ''),
array('attribute'=> 'pricegroup','eq' => 'NO FIELD')
),
'',
'left')
->addAttributeToFilter('status', ['eq' => 1]);
echo $collection->getSelect();
echo '<pre>';print_r($collection->getData());exit;
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Tuesday, 10 September 2019
How to get null attribute product value in magento 1 addAttributeToFilter Filter Query | Where condition
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment