Programatically add customer in magento 5 comments


Programatically add customer in magento tested in Magento 1.5.1.0


require_once 'app/Mage.php';
umask(0);
$websiteId = Mage::app()->getWebsite()->getId();
$store = Mage::app()->getStore();
$customer = Mage::getModel("customer/customer");
$customer->website_id = $websiteId;
$customer->setStore($store);
$customer->firstname = "Branko";
$customer->lastname = "Ajzele";
$customer->email = "ajzele@someserver11.com";
$customer->password_hash = md5("mycoolpass");
$customer->save();


Share on Facebook




About Pragnesh Karia

Pragnesh Karia, Open Source Enthusiast, Software Professional, Software Developer, Technical Lead ,Magento, Joomla ,Joomla LMS , Moodel LMS ,PHP ,Mysql, Ajax, Javascript, Jquery, Linux, Fan of Open Sources , Annet Technologies , SEO Analyst , Mootools


5 thoughts on “Programatically add customer in magento