Class Mage_ImportExport_Model_Import_Entity_Customer
Import entity customer model
- Mage_ImportExport_Model_Import_Entity_Abstract
- Mage_ImportExport_Model_Import_Entity_Customer
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/ImportExport/Model/Import/Entity/Customer.php
public
|
|
protected
|
|
protected
boolean
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_saveCustomerEntity( array $entityRowsIn, array $entityRowsUp )
Update and insert data in entity table. |
public
string|null
|
#
getCustomerId( string $email, string $websiteCode )
Get customer ID. Method tries to find ID from old and new customers. If it fails - it returns NULL. |
public
string
|
|
public
integer
|
|
public
boolean
|
#
isAttributeParticular( string $attrCode )
Is attribute contains particular data (not plain entity attribute). |
public
boolean
|
integer |
BUNCH_SIZE
|
20 |
#
Size of bunch - part of entities to save in one step. |
integer |
SCOPE_DEFAULT
|
1 |
#
Data row scopes. |
integer |
SCOPE_ADDRESS
|
-1 |
|
string |
COL_EMAIL
|
'email' |
#
Permanent column names. |
string |
COL_WEBSITE
|
'_website' |
|
string |
COL_STORE
|
'_store' |
|
string |
ERROR_INVALID_WEBSITE
|
'invalidWebsite' |
#
Error codes. |
string |
ERROR_INVALID_EMAIL
|
'invalidEmail' |
|
string |
ERROR_DUPLICATE_EMAIL_SITE
|
'duplicateEmailSite' |
|
string |
ERROR_EMAIL_IS_EMPTY
|
'emailIsEmpty' |
|
string |
ERROR_ROW_IS_ORPHAN
|
'rowIsOrphan' |
|
string |
ERROR_VALUE_IS_REQUIRED
|
'valueIsRequired' |
|
string |
ERROR_INVALID_STORE
|
'invalidStore' |
|
string |
ERROR_EMAIL_SITE_NOT_FOUND
|
'emailSiteNotFound' |
|
string |
ERROR_PASSWORD_LENGTH
|
'passwordLength' |
|
integer |
DEFAULT_GROUP_ID
|
1 |
#
Customer constants |
integer |
MAX_PASSWD_LENGTH
|
6 |
DB_MAX_PACKET_COEFFICIENT,
DB_MAX_PACKET_DATA,
DB_MAX_TEXT_LENGTH,
DB_MAX_VARCHAR_LENGTH
|
protected
|
$_addressEntity |
|
#
Customer address import entity model. |
protected
array
|
$_attributes | array() |
#
Customer attributes parameters. |
protected
boolean
|
$_customerGlobal |
|
#
Customer account sharing. TRUE - is global, FALSE - is per website. |
protected
array
|
$_customerGroups | array() |
#
Customer groups ID-to-name. |
protected
string
|
$_entityTable |
|
#
Customer entity DB table name. |
protected
array
|
$_ignoredAttributes | array('website_id', 'store_id', 'default_billing', 'default_shipping') |
#
Array of attribute codes which will be ignored in validation and import procedures. For example, when entity attribute has own validation and import procedures or just to deny this attribute processing. |
protected
array
|
$_indexValueAttributes | array('group_id') |
#
Attributes with index (not label) value. |
protected
array
|
$_messageTemplates | array(
self::ERROR_INVALID_WEBSITE => 'Invalid value in Website column (website does not exists?)',
self::ERROR_INVALID_EMAIL => 'E-mail is invalid',
self::ERROR_DUPLICATE_EMAIL_SITE => 'E-mail is duplicated in import file',
self::ERROR_EMAIL_IS_EMPTY => 'E-mail is not specified',
self::ERROR_ROW_IS_ORPHAN => 'Orphan rows that will be skipped due default row errors',
self::ERROR_VALUE_IS_REQUIRED => "Required attribute '%s' has an empty value",
self::ERROR_INVALID_STORE => 'Invalid value in Store column (store does not exists?)',
self::ERROR_EMAIL_SITE_NOT_FOUND => 'E-mail and website combination is not found',
self::ERROR_PASSWORD_LENGTH => 'Invalid password length'
) |
#
Validation failure message template definitions |
protected
array
|
$_newCustomers | array() |
#
Dry-runned customers information from import file. |
protected
array
|
$_oldCustomers | array() |
#
Existing customers information. In form of: |
protected
array
|
$_particularAttributes | array(self::COL_WEBSITE, self::COL_STORE) |
#
Column names that holds values with particular meaning. |
protected
array
|
$_permanentAttributes | array(self::COL_EMAIL, self::COL_WEBSITE) |
#
Permanent entity columns. |
protected
array
|
$_storeCodeToId | array() |
#
All stores code-ID pairs. |
protected
array
|
$_websiteCodeToId | array() |
#
Website code-to-ID |
protected
array
|
$_websiteIdToCode | array() |
#
Website ID-to-code |