コード例 #1
0
ファイル: Address.php プロジェクト: okite11/frames21
 /**
  * Update and insert data in entity table.
  *
  * @param array $entityRows Rows for insert
  * @return Mage_ImportExport_Model_Import_Entity_Customer_Address
  */
 protected function _saveAddressEntity(array $entityRows)
 {
     if ($entityRows) {
         if (Mage_ImportExport_Model_Import::BEHAVIOR_APPEND != $this->_customer->getBehavior()) {
             $customersToClean = array();
             foreach ($entityRows as $entityData) {
                 $customersToClean[$entityData['parent_id']] = true;
             }
             $this->_connection->delete($this->_entityTable, $this->_connection->quoteInto('`parent_id` IN (?)', array_keys($customersToClean)));
         }
         $this->_connection->insertMultiple($this->_entityTable, $entityRows);
     }
     return $this;
 }