Search code examples
prestashopprestashop-1.5prestashop-1.6

How can I export sales from Prestahop 1.5 and import to 1.6? (directly from database)


I have been working on a completely new store (Prestashop 1.6) using the information from my old store (Prestashop 1.5) and now that I am just finishing the last details (and since I don't want to mess things up), I want to know if someone already did this.

My old store is up and running and sales have continued since the last time I have started working on my new store (like two months ago).

Keeping all the information updated (new users, sales, etc.) how can I export directly from my database from Prestashop 1.5 to 1.6?

I've noticed that there are paid modules that does that (a lot actually) but I want to do it manually. I'm just not sure what should I do, which tables can I "copy/paste" and whatsoever.

Any kind of help would be much appreciated.

Thanks a lot!


Solution

  • Ahh... isn't it wonderfull when you find the answer to your very own question? :D

    Ok, so actually this is even easier than I though! :)

    And for anyone that might have this same doubt, here's what I did:

    FIRST OF ALL, BACKUP ALL YOUR DATABASES!!!

    Now that you have finished your BACKUP (did I mentioned that you MUST BACKUP ALL YOUR DATABASES?), you do this:

    On your old prestashop database, you select these tables (I use phpmyadmin for that):

    • ps_address
    • ps_cart
    • ps_cart_product
    • ps_connections
    • ps_connections_source
    • ps_customer
    • ps_customer_group
    • ps_customer_message
    • ps_customer_thread
    • ps_guest
    • ps_message
    • ps_orders
    • ps_order_carrier
    • ps_order_detail
    • ps_order_detail_tax
    • ps_order_history
    • ps_order_invoice
    • ps_order_invoice_payment
    • ps_order_payment
    • ps_order_state
    • ps_order_state_lang

    After that, you select "export" and save that file.

    Then, you go to your new prestashop database (DON'T FORGET TO BACKUP...) and you delete those tables mentioned above (ONLY THOSE ONES, MAKE SURE YOU ARE INDEED SELECTING THE RIGHT ONES).

    Now you have to import the file you exported from your old prestashop (not the entire backup, obviously... only the file that you exported with those tables selected)!

    After import the tables, you will now have to recreate come columns. Now this is a VERY important step, and if you don't do it correctly, your store will NEVER work! (if you don't know how to do this, ask a professional to do it for you or simply buy a module to export and import your stuff)

    • Add column "mobile_theme" to "ps_cart" as tinyint(1) and 0 as default
    • Add column "id_lang" to "ps_customer" as int(10) and NULL as default
    • Add column "date_upd" to "ps_customer_message" as datetime
    • Add column "mobile_theme" to "ps_guest" as tinyint(1) and 0 as default
    • Add column "mobile_theme" to "ps_orders" as tinyint(1) and 0 as default

    Now, I am not sure if these columns were added after I install some module or theme, but anyway if later you try to install some module or theme and some error appear regarding a column, you just have to remove that column and proceed to installation, and it will create the column again.