Post by Lexys » Wed Jan 29, 2014 12:48 am

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?
Last edited by Lexys on Wed Jan 29, 2014 3:04 am, edited 1 time in total.

New member

Posts

Joined
Thu Jan 17, 2013 1:16 am

Post by labeshops » Wed Jan 29, 2014 1:14 am

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 :)

Running Opencart v2.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by Lexys » Wed Jan 29, 2014 1:26 am

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? ;D

New member

Posts

Joined
Thu Jan 17, 2013 1:16 am

Post by Lexys » Wed Jan 29, 2014 2:03 am

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!

New member

Posts

Joined
Thu Jan 17, 2013 1:16 am

Post by nvedia » Wed Jan 29, 2014 9:30 am

Great post
It would be helpful for people migrating from prestashop to opencart :)

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm
Who is online

Users browsing this forum: No registered users and 11 guests