Last active
November 9, 2016 19:21
-
-
Save jclecas/841d4d5e718dd2e662f39ed7be227c21 to your computer and use it in GitHub Desktop.
Magento Collection // Join on attribute table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var Mage_Customer_Model_Resource_Customer_Collection $collection */ | |
$collection = Mage::getModel('customer/customer')->getCollection(); | |
$collection = $collection->joinAttribute( | |
'my_attribute', | |
'customer/my_attribute', | |
'entity_id', | |
null, | |
'left' | |
); | |
$collection = $collection->addAttributeToFilter('my_attribute', array('null' => true)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment