您可以使用 php 魔术 get 和 set 方法
假设设置您可以使用的密码$customer_data->setPassword('1234567');
$customer_data->save();
对于客户地址
$_custom_address = array (
'firstname' => 'firstname',
'lastname' => 'lastname',
'street' => array (
'0' => 'Sample address part1',
'1' => 'Sample address part2',
),
'city' => 'city',
'region_id' => '',
'region' => '',
'postcode' => '31000',
'country_id' => 'US',
'telephone' => '0038531555444',
);
$customAddress = Mage::getModel('customer/address')
$customAddress->setData($_custom_address)
->setCustomerId($customer->getId())
->setIsDefaultBilling('1')
->setIsDefaultShipping('1')
->setSaveInAddressBook('1');
try {
$customAddress->save();
}
catch (Exception $ex) {
//Zend_Debug::dump($ex->getMessage());
}
欲了解更多信息http://inhoo.net/ecommerce/magento/programming-magento/programatically-create-customer-and-order-in-magento-with-full-blast-one-page-checkout-process-under-the -兜帽/