Page 1 of 1
Customers information from prestashop to opencart | SOLVED
Posted: Wed Jan 29, 2014 12:48 am
by Lexys
Hello,
I have successfull transfeared all store information from Prestashop to Opencart, but I have 1 main problem at this moment.
Prestashop customer passwords doesnt work at opencart. I have transfear password fields, but i think here is problem is with password encryption in prestashop.
Maybe somebody know, how to migrate customers from prestashop to opencart? what can I do to make it work?
Re: Import Customers information from prestashop to opencart
Posted: Wed Jan 29, 2014 1:14 am
by labeshops
I had this problem a few years ago and what I did was reset everyone's password to their last name in lower case letters. Then I sent them all an email notifying them of the upgraded software and its new features, their password reset (and how to change it once they logged in to anything they wanted), and gave them a % off their first order on the new cart.
It encouraged customers to come check us out again and boosted sales during the transition too

Re: Import Customers information from prestashop to opencart
Posted: Wed Jan 29, 2014 1:26 am
by Lexys
labeshops wrote:I had this problem a few years ago and what I did was reset everyone's password to their last name in lower case letters. Then I sent them all an email notifying them of the upgraded software and its new features, their password reset (and how to change it once they logged in to anything they wanted), and gave them a % off their first order on the new cart.
It encouraged customers to come check us out again and boosted sales during the transition too

I thinking about it
Opencart passwords are code only by md5 and thats all?
maybe do you have script to make this step more easy?

Re: Import Customers information from prestashop to opencart
Posted: Wed Jan 29, 2014 2:03 am
by Lexys
I think, that I need to add prestashop password encryption to opencart, then I'll make password work prestashop and opencart, but at this moment I dont know how to do it
--------------------------
SOLUTION IS FIND!
I have edit /system/library/customer.php file.
After public function login($email, $password, $override = false) { (46 line)
add fallowing code:
$key_login = 'key from prestashop settings.inc file';
above 51 lines edit this query:
$customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND password = '" . $this->db->escape(md5($password)) . "' AND status = '1' AND approved = '1'");
And update to:
$customer_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE LOWER(email) = '" . $this->db->escape(strtolower($email)) . "' AND
password = '" . $this->db->escape(md5($key_login.$password)) . "' OR password = '" . $this->db->escape(md5($password)) . "' AND status = '1' AND approved = '1'");
After that customers from prestashop, can login with thems own passwords
BRAVO!
Re: Customers information from prestashop to opencart | SOLV
Posted: Wed Jan 29, 2014 9:30 am
by nvedia
Great post
It would be helpful for people migrating from prestashop to opencart
