KamranMK Posted September 23, 2013 Share Posted September 23, 2013 I am not sure if I am doing it right, that's why decided to ask in order to export the database of customers what should I do? There is a big pdf file in documentation regarding database structure of PS 1.5.5 and there i have customer & statistics is that something i need to export and then import into my database? Link to comment Share on other sites More sharing options...
vekia Posted September 23, 2013 Share Posted September 23, 2013 what informations you want to export exactly? only customer info (name surname etc.) ? Link to comment Share on other sites More sharing options...
KamranMK Posted September 23, 2013 Author Share Posted September 23, 2013 what informations you want to export exactly? only customer info (name surname etc.) ? Yes just that information, name, surname, email, phone number and also if possible their passwords, how can i do that? Link to comment Share on other sites More sharing options...
vekia Posted September 23, 2013 Share Posted September 23, 2013 you can't export password because passwords are encrypted (but you can of course export password hash - but in this case you will have to use the same cookie key) select firstname,lastname,email from ps_customer to get phone number you will have to LEFT JOIN ps_address table select A.firstname,A.lastname,A.email,B.phone,B.phone_mobile from ps_customer AS A LEFT JOIN ps_address AS B ON (B.id_customer = A.id_customer) remember that customers can have many addresses and many phone numbers defined! Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 you can't export password because passwords are encrypted (but you can of course export password hash - but in this case you will have to use the same cookie key) select firstname,lastname,email from ps_customer to get phone number you will have to LEFT JOIN ps_address table select A.firstname,A.lastname,A.email,B.phone,B.phone_mobile from ps_customer AS A LEFT JOIN ps_address AS B ON (B.id_customer = A.id_customer) remember that customers can have many addresses and many phone numbers defined! you can't export password because passwords are encrypted (but you can of course export password hash - but in this case you will have to use the same cookie key) select firstname,lastname,email from ps_customer to get phone number you will have to LEFT JOIN ps_address table select A.firstname,A.lastname,A.email,B.phone,B.phone_mobile from ps_customer AS A LEFT JOIN ps_address AS B ON (B.id_customer = A.id_customer) remember that customers can have many addresses and many phone numbers defined! Vekia thank you for helping me out, so if i can't export password does that mean that customers will not be able to log in to their accout on my site and if so, how does it work? will they have to write passwords again? Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 Also what if in my case each customer has one adress and one phone number defined? What can i do with the code which you have wrote here Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 Vekia thank you for helping me out, so if i can't export password does that mean that customers will not be able to log in to their accout on my site and if so, how does it work? will they have to write passwords again? I mean that you can only export encrypted passwords, if you will want to use their data in other prestashop websites, customers will not be able to log in to the store with own passwords because each shop has different code to encrypt password (this code is named SALT). You can only change shop SALT code, then they will log in with own passwords. Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 Also what if in my case each customer has one adress and one phone number defined? What can i do with the code which you have wrote here ok, i pasted above mysql queries. you can run these queries in software like PHPMyAdmin (or other database managers) - then you will see results of these queries, you can export them to .sql file Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 ok, i pasted above mysql queries. you can run these queries in software like PHPMyAdmin (or other database managers) - then you will see results of these queries, you can export them to .sql file Vekia, I am doing eveyrthing as you said, but in my phpMyadmin i don't have an option of exporting like sql? Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 ok, i pasted above mysql queries. you can run these queries in software like PHPMyAdmin (or other database managers) - then you will see results of these queries, you can export them to .sql file With the first query i was able to export to sql but with the second, there is not such option Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 below query results there is a button "export" Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 below query results there is a button "export" Believe it or not i am doing the same thing but i don't have any export as .sql file maybe my phpmyadmin is old can this be? Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 sure, it might be related to old version of phpmyadmin are you able to connect to your mysql server, for example, from your computer ? if so, you can use software like heidiSQL to export queries Link to comment Share on other sites More sharing options...
KamranMK Posted September 24, 2013 Author Share Posted September 24, 2013 sure, it might be related to old version of phpmyadmin are you able to connect to your mysql server, for example, from your computer ? if so, you can use software like heidiSQL to export queries Yes I am able to connect to it, great i will try this software tonight and see if i can export the information Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 im using this software everyday, it is very usefull and you can easily manage own database there waiting for your response hope that you will get it ! Link to comment Share on other sites More sharing options...
KamranMK Posted September 30, 2013 Author Share Posted September 30, 2013 im using this software everyday, it is very usefull and you can easily manage own database there waiting for your response hope that you will get it ! Hi Vekia, so after a long time i am finally transferin the customer database and i was able to execute the first query and take it from the database and isert into the new one, though what i was not able to do that is to take the phone numbers which you have suggested to execute the second command, which worked but when i exported it using the heidisql and then inserted into the new db it did not work, so how can i take the phone numbers from the database in a different way and then put them into the new one so that it matches the customers ids, also take into account that i am having a different customer id from that i had in the old database, i hope i was clear Link to comment Share on other sites More sharing options...
vekia Posted September 30, 2013 Share Posted September 30, 2013 "i exported it using the heidisql and then inserted into the new db it did not work" you've got some error communicate? Link to comment Share on other sites More sharing options...
PrestaShark Posted February 26, 2014 Share Posted February 26, 2014 I mean that you can only export encrypted passwords, if you will want to use their data in other prestashop websites, customers will not be able to log in to the store with own passwords because each shop has different code to encrypt password (this code is named SALT). You can only change shop SALT code, then they will log in with own passwords. I mean that you can only export encrypted passwords, if you will want to use their data in other prestashop websites, customers will not be able to log in to the store with own passwords because each shop has different code to encrypt password (this code is named SALT). You can only change shop SALT code, then they will log in with own passwords. I mean that you can only export encrypted passwords, if you will want to use their data in other prestashop websites, customers will not be able to log in to the store with own passwords because each shop has different code to encrypt password (this code is named SALT). You can only change shop SALT code, then they will log in with own passwords. And the question is? How to change shop SALT code? 1 Link to comment Share on other sites More sharing options...
velisa Posted March 31, 2015 Share Posted March 31, 2015 (edited) According to Vekias guide I exported successfully those data. Is there a way to export by customers how much money they spend. I searched through tables and did not find this info. I guess that I should combine few queries. Update: Found that this query is working for me: SELECT id_customer, SUM( total_paid_real ) FROM ps_orders GROUP BY id_customer Can somebody help me with nested query to combine above query with query that Vekia posted as I need one unique CSV: SELECT A.firstname, A.lastname, A.email, A.birthday, B.phone, B.phone_mobile, B.address1, B.address2, B.postcode, B.city, C.name FROM ps_customer AS A LEFT JOIN ps_address AS B ON ( B.id_customer = A.id_customer ) LEFT JOIN ps_country_lang AS C ON ( C.id_country = B.id_country ) Thanks Edited April 1, 2015 by velisa (see edit history) Link to comment Share on other sites More sharing options...
velisa Posted April 2, 2015 Share Posted April 2, 2015 I found solution, so if anybody needs how much their customers spent: SELECT A.firstname, A.lastname, A.email, A.birthday, B.phone, B.phone_mobile, B.address1, B.address2, B.postcode, B.city, C.name, SUM(D.totail_paid_real) FROM ps_customer AS A LEFT JOIN ps_address AS B ON ( B.id_customer = A.id_customer ) LEFT JOIN ps_country_lang AS C ON ( C.id_country = B.id_country ) LEFT JOIN ps_orders AS D ON (A.id_customer=D.id_customer) GROUP BY 1,2 Link to comment Share on other sites More sharing options...
biteme Posted April 28, 2015 Share Posted April 28, 2015 hi all i want to ask a question. i want to export my costumers numbers who wants to get news on our website. can i do ? Link to comment Share on other sites More sharing options...
PrestaShark Posted April 28, 2015 Share Posted April 28, 2015 hi all i want to ask a question. i want to export my costumers numbers who wants to get news on our website. can i do ? Hi, You need just to use Newsletter Module. There You can export file with customers that want to receive newsletter from Your site (Newsletter Block or registred user with newsletter subscribtion Link to comment Share on other sites More sharing options...
biteme Posted April 28, 2015 Share Posted April 28, 2015 (edited) i used the newsletter module. my costumers are select the sucscribe tick. bu t i want to phone numbers who click the sucscribe tick. i want to send a text messege (SMS) to my customers who wants a sucscribe news.. Edited April 28, 2015 by biteme (see edit history) Link to comment Share on other sites More sharing options...
PrestaShark Posted April 28, 2015 Share Posted April 28, 2015 Ah that trick... In that case You should use free Export Customers module by PhpMadman from here https://www.prestashop.com/forums/topic/220774-free-module-export-customers-with-address/ This is highly effective and recomended tool Link to comment Share on other sites More sharing options...
biteme Posted April 28, 2015 Share Posted April 28, 2015 Prestashark thank you so much. thats really great module . and its free. Link to comment Share on other sites More sharing options...
PrestaShark Posted April 28, 2015 Share Posted April 28, 2015 You welcome Happy selling! Link to comment Share on other sites More sharing options...
Shabas Posted June 30, 2015 Share Posted June 30, 2015 hi, I need a help here. I need to export order of specific date. Export orders only exports little info. I need address pincode order number price customer name payment process in different columns. Can anyone suggest a query to export. Any help appreciated. thanx Link to comment Share on other sites More sharing options...
ajaykumarsingh395 Posted November 18, 2015 Share Posted November 18, 2015 I mean that you can only export encrypted passwords, if you will want to use their data in other prestashop websites, customers will not be able to log in to the store with own passwords because each shop has different code to encrypt password (this code is named SALT). You can only change shop SALT code, then they will log in with own passwords. So how can change SALT code ? Link to comment Share on other sites More sharing options...
Recommended Posts