Jump to content

How can we export products, orders etc? to import into clean 1.5 install


Recommended Posts

Like many others on here the upgrade from 1.4.x to 1.5 has not been smooth if its even worked at all.

 

So therefore i was wondering if its possible to just export the products, orders and customers from an existing 1.4 install and import them into a cleanly installed prestashop 1.5. that can then be configured manually to the same setup as our 1.4 installs?

 

If i had more knowledge of the database structure of prestashop i would give it a go myself as i expect you can do it from phpmyadmin but i wouldn't know where to start.

 

If need be i'd be willing to put up $20 towards a fund for someone to write a module to do it.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I found this website. They offer basically the same service that we all need. But as far as I understood data transfer process is automatic and you don't have to do any import/export. However, I'm afraid it will cost more than $20.

So, here is a question: does anyone used their services? Was the upgrade process successful? And does it really worth money to spend?

Thanks for sharing experience =)

Link to comment
Share on other sites

  • 2 weeks later...

I've been considering going into phpMyAdmin and copying the tables for product categories, descriptions, and images from my 1.4 version and pasting them into the 1.5 database, for essentially the same reason.

 

Does anyone know which databases from 1.4.8 are compatible with 1.5.2?

Link to comment
Share on other sites

I exported my tables with custom option and dropped table and uploaded to new database. I changed the config setting in the prefix was different and had to reset my back office log in but it worked and I had all my customers, setting and products. the trick comes when you want multi shop as if you want to share stock the quantities disappear and you have to enter these what a pain. Although I have it all working there are still many challenges which cause issues and I still dont think it is worth going live on

Link to comment
Share on other sites

I exported my tables with custom option and dropped table and uploaded to new database. I changed the config setting in the prefix was different and had to reset my back office log in but it worked and I had all my customers, setting and products. the trick comes when you want multi shop as if you want to share stock the quantities disappear and you have to enter these what a pain. Although I have it all working there are still many challenges which cause issues and I still dont think it is worth going live on

could you mind teach me step by step how do this? please.

what table you did export. pls

Link to comment
Share on other sites

Firstly I need to say I am no expert and it is trial and error but:

I went in to the php admin in my cpanel.

selected the database and clicked export (top tab on the page)

 

I screen comes up asking quick method or custom.

 

I selected custom

under output I selected zip compression to enable the upload to not time out.

I selected structure and data.

I unticked create tables and ticked drop table

now hit go.

 

It then exports a zip file and then I go to the new databse and select import .

I imported the zip sql file from my download and it saved into the database.

 

you need to make sure the prefix is the same if not you have one table with prefix ps.... and the other ps.something...

If the new database is ps.something then you need to change the config setting folder to prefix ps.something...

 

Hope this helps

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Yes I've the link above (which is Cart2Cart, for migrating data from one brand of estore to a different brand, or from one domain to another of the same store), and it imports everything beautifully, even orders and additional images. I've used it several times and it's are excellent. Price varies on amount of products etc, but with 300 products and 3500 customers, it cost me about $80.

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

  • 3 weeks later...

I thought it was a joke, but is paying 80$ ONLY option how to export products from PS 1.4 to 1.5?

 

As many others, I have not succeeded upgrading PS 1.4 to 1.5 even though I followed official manual. How come I can't upgrade to 1.5, what's with backward compatibility?

 

Don't tell me I have re-create all the products, manufacturers and everything else again...

Link to comment
Share on other sites

  • 2 weeks later...

Upgrade successfully!

 

I have upgraded couple of projects from 1.3.x, 1.4.x to 1.5.x versions with all current functionality, theme, data and settings. if anyone want to upgrade to latest version. please contact me.

skype: kashif.murtaza1

Could you not just tell us how you did it?

 

I've currently got a shop running on 1.3, and am trying to install 1.4 in a test subdomain, and need to transfer all the information over. But frankly, if it's as awkward as everything else seems to be in Prestashop, then I'll probably stay with the 1.3 installation.

Link to comment
Share on other sites

  • 2 weeks later...

I like Prestashop, but the more I get in to it the more I see Prestashop creating issues where it should be solving them. Yes the Cart2Cart works, but why should we have to pay for an upgrade that should have worked in the first place. Better yet, why has prestashop not listed what needs to get moved from one database to another. This information has certainly been given to Cart2Cart. It almost seems as if Prestashop has left problems in so that it can profit from selling the fix.

  • Like 4
Link to comment
Share on other sites

Hi Everyone,

 

Like all of you, I've not been able to CLEANLY upgrade from 1.4 to 1.5 without starting over! If you're looking to move your products over from 1.4 to 1.5 - you can't just copy the database from 1.4 into 1.5 because the database is structured differently and it will cause allot of problems.

 

So I did it like this:

 

I have over 20 000 products.

 

I used an sql statement in phpmyadmin to gather the relevant information into one table and then I exported the info to an excel document. From excel I converted the document into a csv file then I used the csv import in prestashop to import all my products.

 

A challenge: getting image urls into your csv...so that when you import the csv the images are uploaded too.

 

My Solution: I had to use php to create a table in the database that pointed to the relevant image (this is tricky to do if you don't know php) so you can hire a developer or inbox me.

 

So first I had to create a database table which I randomly called "jash3" that would hold the "id_product" and "id_image" columns...I used an sql statement and gathered that data from an existing table called "ps_image".

 

Then I added an empty column to the table called "image_url" - this would hold the url of the image so that prestashop can upload the image during the import and generate all the different sizes...the url would end up looking like this: http://localhost/myo...7/9/2/21792.jpg

 

I used php to create the urls from the image folder in the 1.4 version of my site...and write them to my "jash3" table.

 

 

This will only make sense for people who are familiar with php:

 

<?php
function dbQueryAssoc($request) {
$db = new mysqli('localhost', 'username', 'password', 'database_name');
$result = $db->query($request);
$result = mysqli_fetch_all($result);
return $result;  
}
//takes a variable (sql string), and runs it on the database

function dbQuery($sql) {
$db = new mysqli('localhost', 'username, 'password', 'database_name');
$result = $db->query($sql);
return $result;
}
//http://localhost/myoldsite/img/p/2/1/7/9/2/21792.jpg


$url = "http://localhost/myoldsite/img/p";

echo $url;
echo "<br/><br/>";
$sql = "SELECT `id_product`,`id_image` FROM `jash3`";
$all = dbQueryAssoc($sql);
$how_many = 0;
foreach ($all as $value) {

$split_array = str_split($value[1]);

$tester = "";

foreach ($split_array as $single_digit) {
 $tester .= "/" . $single_digit;
}

$tester .= "/";

$this_url = $url . $tester . $value[1] . ".jpg";

echo "id: " . $value[0] . " image id: " . $value[1] . " -----Tester is: " . $this_url;
echo "<br />\n";

$sql_write_statement = "UPDATE jash3 SET url='" . $this_url . "' WHERE id_product='" . $value[0] . "'";
//dbQuery($sql_write_statement);

$how_many++;

}
echo $how_many;
?>

 

Then I used an sql statement to gather all the info needed to create a csv from the database.

 

BUT it is tricky to do and because of limitation on the amount of data you can process at a time in phpmyadmin, you will have to export the data in batches of about 3500 records at a time...(I was working in xampp and I was only able to do it in batches of 3500 at a time).

 

To give you an idea of the sql statement I used...for those that are experienced in sql:

 

SELECT
ps_product.id_product,
ps_product.active,
ps_product_lang.name AS name,
ps_category_lang.name AS category,
ps_product.price,
ps_product.id_tax_rules_group,
ps_product.wholesale_price,
ps_product.on_sale,
ps_product.reference,
ps_manufacturer.name AS manufacturer,
ps_product.ean13,
ps_product.upc,
ps_product.ecotax,
ps_product.weight,
ps_product.quantity,
ps_product_lang.description_short,
ps_product_lang.description,
ps_product_lang.meta_title,
ps_product_lang.meta_description,
ps_product.available_for_order,
ps_product.show_price,
ps_feature_product.id_feature_value,
ps_product.online_only,
ps_product.condition,
jash3.url

FROM ps_product
  JOIN ps_product_lang
  ON ps_product.id_product = ps_product_lang.id_product
  JOIN ps_category_product
  ON ps_product.id_product = ps_category_product.id_product
  JOIN ps_category_lang
  ON ps_category_product.id_category = ps_category_lang.id_category
  JOIN ps_manufacturer
  ON ps_product.id_manufacturer = ps_manufacturer.id_manufacturer
  JOIN ps_feature_product
  ON ps_product.id_product = ps_feature_product.id_product
  JOIN jash3
  ON ps_product.id_product = jash3.id_product

LIMIT 3500

 

 

Then I found that exporting from phpmyadmin directly to a csv created issues for me, so I first exported as a 2007 excel document...make sure you don't use NULL for blank cells (it should be empty). Once you have your excel document, save as a csv (I used comma delimited) and import the csv in prestashop 1.5. - you may then experience errors (for me the upc fields in 1.4. had alphanumeric characters but 1.5 wanted numbers only...so I had to find a workaround for that). It's a lengthy process but it's the cleanest way to get your products into 1.5 from 1.4 - if a simple upgrade isn't working out for you.

 

ANOTHER ISSUE I experienced during the import: I was unable to import product features via the csv...see my post here: http://www.prestasho...87#entry1047187

 

But I was able to do it by exporting the feature tables via phpmyadmin from 1.4 and importing them into 1.5. The tables I exported were: ps_feature, ps_feature_lang, ps_feature_product, ps_feature_valu, ps_feature_value_lang

 

NOTE: you must only do this step AFTER you're done importing the products.

 

Now I know it's greek to those that aren't well-versed in php/sql but hopefully it will give you a shove in the right direction. Inbox me if you don't have a developer that can help you.

 

TIP: NEVER do anything on your live site! Always try it out on a test version of your site before messing with your database on a live site. :P

 

Good Luck Guys!!!

Edited by Arkadia (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 5 months later...

Hi All,

 

I managed to update my database from 1.4.4.1 to 1.5.4.1 using this manual upgrade procedure: http://www.prestashop.com/forums/topic/251288-manual-upgrade-guide-ps-12-ps-13-ps-14-upgrade-only-database/

 

Unfortunately it didn't work out to upgrade the shop completely as it gave an internal error while regenerating the images and the front office is a mess (product urls are not working).

 

However, the good news is that at least all my customer data and order history have now the 1.5.4.1 database structure. I'm now exporting every single customer and order related table from the upgraded 1.5.4.1 database and after that, my plan is to import it in a total clean install of 1.5.4.1.

 

I'm sure this is not the best way of upgrading to 1.5.4.1, but all my previous attempts have failed sofar (incl. the autoupgrade module doesn't work for 1.4.4.1). Fingers crossed for this one!

Link to comment
Share on other sites

  • 5 years later...
On 11/5/2012 at 11:29 AM, the hat lady said:

....

I selected custom

under output I selected zip compression to enable the upload to not time out.

I selected structure and data.

I unticked create tables and ticked drop table

now hit go.

...

I want to hug you mate, buy flowers and marry. Thanks a million for this instruction, after hard fight it worked on my server!

Screenshot 2018-12-12 at 19.01.57.png

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...