Esempio n. 1
0
 /**
  * Initialize existent customers data
  *
  * @return Mage_ImportExport_Model_Export_Entity_Eav_Customer_Address
  */
 protected function _initCustomers()
 {
     if (empty($this->_customers)) {
         // add customer default addresses column name to customer attribute mapping array
         $this->_customerCollection->addAttributeToSelect(self::$_defaultAddressAttributeMapping);
         // filter customer collection
         $this->_customerCollection = $this->_customerEntity->filterEntityCollection($this->_customerCollection);
         $customers = array();
         $addCustomer = function (Mage_Customer_Model_Customer $customer) use(&$customers) {
             $customers[$customer->getId()] = $customer->getData();
         };
         $this->_byPagesIterator->iterate($this->_customerCollection, $this->_pageSize, array($addCustomer));
         $this->_customers = $customers;
     }
     return $this;
 }