Jump to content

Importing orders directly in the database


AlexLm

Recommended Posts

Hey guys,

 

This is my very first topic, first issue I've encountered with Prestashop in trying to migrate to 1.7.6.7 from a proprietary system with thousands of orders. I want to migrate them so I can do better data analysis and so users can see their order history when they log in. 

Is there a way to import orders in Prestashop via .csv ? If yes, what are the different steps and how should I present the .csv ? 

After some searches, I found Store Manager has this option but it would cost half the budget my client is allowing me and I would only use it for this task...

I hope someone can guide me through this.

 

Cheers,

Edited by AlexLm (see edit history)
Link to comment
Share on other sites

That's a good idea to save. 🙂
If you think that the solution is simple, then I will immediately write to you that it is not.
Storemanager is free for 30 days.
If you don't have all the necessary data in the csv file, Storemanager won't help you either.
 
Orders are divided into several tables and are linked to addresses, customers, product ids, invoice ids, cart ids, attributes, etc ....
It is not possible from one csv file.

Script programming is not such a problem, but the price would be the same as for Storemanager.

Link to comment
Share on other sites

@Guest that's a fantastic news, thank you so much ! I believe it is free only for few orders (it should be limited right ?) . I am preparing the .csv file, do you have a template of the columns I need to fill ? Thank so so so much for your answer and help ! 

@Maria Kvasnytska Thank you for this tutorial ! I am considering trying Prestashop, it will be really useful. 

Do you anyone know how is the order file presented ? (if I get it directly through ftp)

Link to comment
Share on other sites

If you mean you'd like to transfer files directly between databases - as for me, it's not quite a good idea, as there's always a risk of data mismatch during the process. So, I wouldn't recommend neither the direct transfer of files, nor via backup/restore. As for the Store Manager, there's a simple migration via csv file, correspondingly, the safest way among the mentioned ones.

Link to comment
Share on other sites

I think the csv file he has is not from Prestashop, but from another system.
I don't know why the method of importing with my own script should be unsatisfactory?
And what does Store Manager do? Does csv import by airmail?
Do not confuse the inexperienced with such statements.
If the script will go through a csv file, the first one will create a new address in ps_address and save the insert id in the variable, the second thing will create a customer in ps_customer and save the insert id in the variable and insert the insert id address directly in ps_customer. ..
and finally a new order is created and the saved insert ids .... are inserted and done.
If there is not all the necessary information for import in the csv file, then nothing will be imported even through the magician.
It has to put the header of the csv file here and then it can be written with certainty, yes it can be imported, no it cannot be imported.

Link to comment
Share on other sites

I successfully uploaded my contacts on Prestashop.
 

I already have the client IDs link to the addresses and orders. I am looking for a way to import my orders in Prestashop. It seems that you are well aware of this subject @Guest , can I do it with ftp ? 


I also have this issue when I try to import my addresses, do anyone know where it is from ? 

 

Capture d’écran 2020-11-02 à 19.54.10.png

Link to comment
Share on other sites

After all, I wrote that it will not work like this and you will do it your way anyway.
I wrote you to put the first line of the CSV file "header" here.
If you have it in a language other than English, you have to translate it and then write it here.
E.g.
the first line is:

id;lastname;firstname;email;street;city;country;vat_number;dni_number;phone;.......................

Link to comment
Share on other sites

Also specify how many csv files you have to import.
If you have multiple csv files, please specify what is in them.
Are the csv files from another Prestashop?

Link to comment
Share on other sites

Here is the "header" of my address.csv : Address ID;Alias*;Active (0/1);Customer e-mail*;Customer ID;Manufacturer;Supplier;Company;Lastname*;Firstname*;Address 1*;Address 2;Zipcode*;City*;Country*;State;Other (notes);Phone;Mobile Phone;VAT number;DNI
I followed the template of Prestashop. 
 

8 minutes ago, Guest said:

Also specify how many csv files you have to import.
If you have multiple csv files, please specify what is in them.
Are the csv files from another Prestashop?

I have to import 2 more csv files : addresses and orders. 

For the orders csv file, this is my question what should be the headers of the csv file ? 
Thank you buddy

Link to comment
Share on other sites

On 11/2/2020 at 10:39 AM, Maria Kvasnytska said:

Hello, Alex!

You can freely use Store Manager trial version, no payments for 14 days are needed.

You can connect to both source and target stores, and migrate orders via export/import, here's the guide.

If help with the task is needed - the support is at your disposal. 

I tried Presta Store manager and I did import my orders on it but it doesn't show on Prestashop Backoffice. I am trying to reach the Presta Store support through Live Chat but they are never connected... Do you know where they are based ? I need to see from when to when they are connected. 
Also have you already been importing orders on Presta Store and does it appear on the backoffice of Prestashop ?

Link to comment
Share on other sites

  • 3 weeks later...

Hello, Alex, sorry for the late reply. If you are working with the Bridge type of connection, it requires synchroniation to see the changes made (Get Data from Web and Post Changes to Web operations). It's an advantage, actually, as you can revert the unwanted changes before posting them live. Support of Store Manager is provided Monday through Friday, 11.00 to 19.00 (GMT +02.00). Have you already managed to import orders with the software?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...