I need to import a load of customers to a third party email company but need to only import those that are currently subscribed to newsletters. The import itself has to be a file of customer details which I need to generate. I know I could load up all customers into a collection and iterate through them, only inserting those that are subscribed into the import file but as we have 90000 plus customers I would rather just load the ones that are subscribed into the collection. The import itself uses an API but it needs to have the import file added as an attachment (fine doing that, just including it for information).
Any ideas?
Best Answer
You have to join EAV collection with regular table. It is achievable with
joinTable
method ofMage_Eav_Model_Entity_Collection_Abstract
class. The forth parameter defines theWHERE
condition because apparently you can't useaddAttributeToFilter
method here.Please let me know if something is unclear.