Randem Systems Support Board

OpenCart => OpenCart MODS => Topic started by: Randem on December 22, 2015, 06:24:23 PM

Title: Migrating your data from OpenCart Version 1.5.6.4 to Version 2.1.0.x
Post by: Randem on December 22, 2015, 06:24:23 PM
DO NOT ATTEMPT AN IN PLACE UPGRADE!!!
ONLY ATTEMPT AN UPGRADE/MIGRATION ON A COPY OF YOUR DATABASE!


You should NEVER operate on a live environment unless you ABSOLUTELY have to! No Professional would have you do any different.
Using these procedures will require some working knowledge of SQL, phpMyAdmin and the ability to follow direction verbatim.
If you do not have these skills you should PAY someone to do it for you.
There are people on the OpenCart.com website who you can pay to convert your site for you.
We can do it for you also; but we charge much more for that service than those who do it on OpenCart.

NOTE: The changes in OpenCart v2.1.0.2 are insignificant and do not have ANY affect the this upgrade process.
Steps 5 & 6 are about replacing the database in the new install with the one you want to covert.
If upgrading from v2.0.x to 2.1.x you can most likely skip steps 3,4 & 9


It has taken some effort but we have put together enough information from our efforts and sources on the OpenCart forum
(The original upgrade.php and Pekka Mansikka's OpenCart Upgrade & Migration Tool 1.4.x - 2.x). We have developed some
steps needed to help migrate your data to the OpenCart 2.1.0.x version database. In the migration you WILL loose any modules you had installed along with any MODS, Layouts and settings.
ALL MODS IN THE PRIOR VERSION NEED TO BE DISABLED!!!
You will need to re-input all layouts for your stores. Download OUR upgrade.zip file, unzip it then upload the file to your new installation.
If you want; you can use our VQMOD XML file to add the upgrade.php file to your installation along with all the current changes we have made up until now located at bottom of this post (Recommended).

Here are the steps needed to help you migrate. We use phpMyAdmin for all Import/Export functions.
Do not take ANY shortcuts or this procedure WILL NOT WORK PROPERLY and you will get MANY errors.
This has been tested on OpenCart Database v1.5.4 and up and will work on any earlier version for database migration.

Also from my understanding you should update your php to a version higher than 5.3 for best results using OpenCart v2.x.
If you need to upgrade from v2.1.0.x to v2.2.0.0 (https://randemsystems.support/opencart/migrating-your-data-from-opencart-version-2-1-0-x-to-version-2-2-0-0-%28test-only%29/msg6260/#msg6260)


SELECT DISTINCT * FROM oc_country WHERE country_id = '0'
        File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-system_library_db_mysqli.php Func: LogSQL  Line: 19
        File: /home/content/57/10005557/html/opencarttest/system/library/db.php Func: query  Line: 16
        File: /home/content/57/10005557/html/opencarttest/admin/model/localisation/country.php Func: query  Line: 22
        File: /home/content/57/10005557/html/opencarttest/admin/controller/localisation/country.php Func: getCountry  Line: 458
        File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-system_engine_action.php Func: call_user_func  Line: 46
        File: /home/content/57/10005557/html/opencarttest/system/engine/front.php Func: execute  Line: 34
        File: /home/content/57/10005557/html/opencarttest/system/engine/front.php Func: execute  Line: 29
        File: /home/content/57/10005557/html/opencarttest/admin/index.php Func: dispatch  Line: 178


Start from the last line then read backwards to trace the sequence in which the actually module called the SQL statement.
REMEMBER, When moving to production; replace this file with the original mysqli.php file from the original install.

Updated 04/24/2016 - v2.1.0.x Changes.zip

This VQMOD XML file is the VQMod (http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19501) install that contains all the changes below that we have made to OpenCart v2.1.0.x to correct issues.
Use this procedure if you do not want to make physical changes to your OpenCart files (Recommended).
Contents has the correct .htaccess file for SEO URL's to work (rename htaccess.txt to .htaccess).
Using this method contains the proper upgrade.php file and all changes listed here to correct other upgrade issues also. Best when used with VQMOD Manager (http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19188)


If you like the work that we have done, please donate to make helpful new work possible.

Donate with Credit Card (https://blaxtonjames.com/Payments)
Donate with PayPal (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3M92TBXENQ7RS)