Skip to content

Instantly share code, notes, and snippets.

@jzahedieh
Created March 31, 2015 14:12
Show Gist options
  • Save jzahedieh/8af77c84418ad9c354cf to your computer and use it in GitHub Desktop.
Save jzahedieh/8af77c84418ad9c354cf to your computer and use it in GitHub Desktop.
Magento CONCAT EAV Attributes
$collection = Mage::getModel('customer/address')->getCollection();
$collection->addAttributeToSelect('*');
$collection->addExpressionAttributeToSelect(
'full_address',
"CONCAT({{firstname}}, {{lastname}}, {{street}}, {{city}}, {{postcode}})",
array('firstname', 'lastname', 'street', 'city', 'postcode')
);
var_dump($collection->getFirstItem()->getData('full_address'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment