Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Export all customers from Magento 1.9.x - names & email addresses
-- Export all customers from Magento - names & email addresses
select ce.entity_id, concat(cevf.value, ' ', cevl.value) fullname, ce.email
from customer_entity ce
inner join customer_entity_varchar cevf
on ce.entity_id = cevf.entity_id
inner join eav_attribute eaf
on eaf.attribute_id = cevf.attribute_id
inner join customer_entity_varchar cevl
on ce.entity_id = cevl.entity_id
inner join eav_attribute eal
on eal.attribute_id = cevl.attribute_id
inner join eav_entity_type eet
on eet.entity_type_id = eal.entity_type_id = eaf.entity_type_id
where
eet.entity_type_code = 'customer'
and eaf.attribute_code = 'firstname'
and eal.attribute_code = 'lastname'
order by ce.entity_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment