Magento Themes and Magento Extensions

Creating Customer Using Magento API

Share

You can able to create a customer using magento API.Here the following code will create a customer in magento.

$client = new SoapClient(‘http://192.168.1.190/magento/index.php/api/soap/?wsdl’);
$session = $client->login(‘xxxx’,'yyyy’);
$customerInfo = array(
‘firstname’ => ‘Anish’,
‘lastname’ => ‘Kumar’,
‘email’ => ‘anish@example.com’,
‘password_hash’ => md5(‘password’),
‘store_id’ => 0,
‘website_id’ => 0
);
$newCustomerId = $client->call($session, ‘customer.create’,
array($customerInfo));
$client->endSession($session);
?>
Check it out in magento(customers->Manage Customers).You will see a customer that you created.

Comments are closed.