Skip to content

Instantly share code, notes, and snippets.

@ajbonner
Last active January 1, 2016 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajbonner/8095838 to your computer and use it in GitHub Desktop.
Save ajbonner/8095838 to your computer and use it in GitHub Desktop.
Adding an attribute to a magento customer collection
$commonwealthSubscribers = Mage::getModel('customer/customer')
->getCollection()
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing')
->addAttributeToFilter('billing_country_id', array('in' => 'AU', 'CA', 'GB'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment