21 abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entity\AbstractEav
111 $this->_storageFactory = $storageFactory;
127 self::ERROR_EMAIL_IS_EMPTY,
128 __(
"An email wasn't specified. Enter the email and try again.")
130 $this->
addMessageTemplate(self::ERROR_INVALID_WEBSITE,
__(
'We found an invalid value in a website column.'));
132 $this->
addMessageTemplate(self::ERROR_VALUE_IS_REQUIRED,
__(
'Please make sure attribute "%s" is not empty.'));
134 self::ERROR_CUSTOMER_NOT_FOUND,
135 __(
'We can\'t find a customer who matches this email and website code.')
149 if (!isset(
$data[
'page_size'])) {
152 $this->_customerStorage = isset(
153 $data[
'customer_storage']
154 ) ?
$data[
'customer_storage'] : $this->_storageFactory->create(
188 if (isset($this->_validatedRows[$rowNumber])) {
192 $this->_validatedRows[$rowNumber] =
true;
193 $this->_processedEntitiesCount++;
230 if (empty($rowData[static::COLUMN_WEBSITE])) {
231 $this->
addRowError(static::ERROR_WEBSITE_IS_EMPTY, $rowNumber, static::COLUMN_WEBSITE);
232 }
elseif (empty($rowData[static::COLUMN_EMAIL])) {
233 $this->
addRowError(static::ERROR_EMAIL_IS_EMPTY, $rowNumber, static::COLUMN_EMAIL);
235 $email = strtolower($rowData[static::COLUMN_EMAIL]);
236 $website = $rowData[static::COLUMN_WEBSITE];
239 $this->
addRowError(static::ERROR_INVALID_EMAIL, $rowNumber, static::COLUMN_EMAIL);
241 $this->
addRowError(static::ERROR_INVALID_WEBSITE, $rowNumber, static::COLUMN_WEBSITE);
267 return isset($attributeParameters[
'options'][strtolower(
$value)])
268 ? $attributeParameters[
'options'][strtolower(
$value)]
elseif(isset( $params[ 'redirect_parent']))
getMultipleValueSeparator()
_validateRowForDelete(array $rowData, $rowNumber)
const BEHAVIOR_ADD_UPDATE
addRowError( $errorCode, $errorRowNum, $colName=null, $errorMessage=null, $errorLevel=ProcessingError::ERROR_LEVEL_CRITICAL, $errorDescription=null)
const ERROR_WEBSITE_IS_EMPTY
const COLUMN_DEFAULT_BILLING
_checkUniqueKey(array $rowData, $rowNumber)
const DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR
_initCustomers(array $data)
const FIELD_FIELD_MULTIPLE_VALUE_SEPARATOR
const COLUMN_DEFAULT_SHIPPING
const ERROR_EMAIL_IS_EMPTY
const ERROR_INVALID_EMAIL
getBehavior(array $rowData=null)
const ERROR_CUSTOMER_NOT_FOUND
const ERROR_VALUE_IS_REQUIRED
getSelectAttrIdByValue(array $attributeParameters, $value)
addMessageTemplate($errorCode, $message)
static is($value, $classBaseName, array $args=array(), $namespaces=array())
_getCustomerId($email, $websiteCode)
_validateRowForUpdate(array $rowData, $rowNumber)
const ERROR_INVALID_WEBSITE
if(!isset($_GET['website_code'])) $websiteCode
__construct(\Magento\Framework\Stdlib\StringUtils $string, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\ImportExport\Model\ImportFactory $importFactory, \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper, \Magento\Framework\App\ResourceConnection $resource, ProcessingErrorAggregatorInterface $errorAggregator, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\ImportExport\Model\Export\Factory $collectionFactory, \Magento\Eav\Model\Config $eavConfig, \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\StorageFactory $storageFactory, array $data=[])
validateRow(array $rowData, $rowNumber)