使用AvS_Fastsimpleimporter创建新用户时是否可以添加超过标准地址?
目前我的数组“数据”看起来像这样
'email' => $kunde['email'],
'_website' => $_website,
'_store' => $_website . 'store',
'confirmation' => '',
'created_at' => $created_at,
'created_in' => 'Import',
'disable_auto_group_change' => 0,
'firstname' => $kunde['name_1'],
'group_id' => 3,
'kontonummer' => $kunde['kontonr'],
'kundennummer' => $kunde['kundennr'],
'lastname' => $lastname,
'password_hash' => $password_hash,
'store_id' => 0,
'website_id' => $country['id'],
'_address_city' => $kunde['ort'],
'_address_country_id' => $kunde['land'],
'_address_fax' => $kunde['fax'],
'_address_firstname' => $kunde['name_1'],
'_address_lastname' => $lastname,
'_address_postcode' => $kunde['plz'],
'_address_street' => $kunde['strasse'],
'_address_telephone' => $_address_telephone,
'_address_vat_id' => $kunde['ust_id'],
'_address_default_billing_' => 1,
'_address_default_shipping_' => 1,
我想在AvS_Simpleimporter中添加第二个地址。 我试图在这样的数据中添加第二个数组:
array_push($data, array(
'email' => null,
'_website' => null,
'_address_city' => checkRequiredInput($address['ort']),
'_address_country_id' => $address['land'],
'_address_firstname' => checkRequiredInputVadr($address['name_1']),
'_address_lastname' => checkRequiredInputVadr($address['name_2']),
'_address_postcode' => checkRequiredInput($address['plz']),
'_address_street' => checkRequiredInput($address['strasse']),
'_address_default_billing_' => 0,
'_address_default_shipping_' => 0,
));
然后用
执行$importer = Mage::getModel('fastsimpleimport/import');
$importer->setIgnoreDuplicates('password_hash')->processCustomerImport($data);
但目前这不起作用。第二个地址作为额外数组添加到这样的数据
.... data array
....
'_address_default_billing_' => 1
'_address_default_shipping_' => 1
[0] => 'email' => bla bla
'_website' => bla bla
and so son
任何帮助?
答案 0 :(得分:1)
将多个地址作为附加行导入。因此,您需要:
'_address_country_id' => array($country1,$country2),
'_address_city' => array($city1, $city2),
....