Post by Qphoria » Wed Mar 04, 2015 1:28 am

For those having some trouble with upgrading, I've put together a quick guide for upgrading. I cannot promise this will work for everyone as everyone's store and server is different, and there are a lot of steps that can be confusing.

I strongly recommend using my upgrade service as I've done over 300 updates from 1.5.x to 2.x, but I will put the high-level steps below:
  1. Uninstall all modules, openbay, and bank transfer (if used) by running the following commands in phpmyadmin. Note you may need to adjust the db prefix "oc_" for your database prefix.

    Code: Select all

    delete from oc_setting where `key` like '%module%'
    delete from oc_setting where `key` like '%openbay%'
    delete from oc_setting where `group` like '%bank_transfer%'
    delete from oc_extension where `type` = 'module'
    delete from oc_extension where `type` = 'payment' AND `code` = 'bank_transfer'
    This removes the old format from the database so that when the new code tries to access it, it doesn't pull the older orphaned records which can conflict with the new settings. If you don't do this, you'll see errors about undefined settings for latest, bestsellers, etc and the old openbay stuff will cause the site to fail to load.
  2. Upload all new files from the latest version of OpenCart.
  3. Edit: config.php and admin/config.php and copy the line for "DIR_LOGS" in each of those files and paste 2 copies of that line under that with the following changes:
    define('DIR_MODIFICATION', '/home/public_html/path/to/store/system/modification/');
    define('DIR_UPLOAD', '/home/public_html/path/to/store/system/upload/');
  4. Also change
    define('DB_DRIVER', 'mysql'); to mysqli
    and save
  5. Run the file. It should ask you to Upgrade.
  6. Run the upgrade. It will likely throw an error about it could not drop option_values.
  7. Ignore that and refresh the install page. This time it should finish successfully.
  8. Now goto the Admin login. Hit Ctrl+F5 on your keyboard a few times.
  9. Login and you might see some errors and jumbled styles. Hit Ctrl+F5 a few times again. These should go away. You may still get some popups. Close those and goto the Users->User Groups menu
  10. Edit Top Administrator and select all for both modify and access. Save. That should remove most errors
  11. Goto Users->API and insert a new API user. This is needed for editing orders in the backend. I usually just create the user "json" and generate the password.
  12. Now goto System->Settings and edit the store settings.
  13. Update any new fields that don't have values. Check through them carefully. Save. That should get rid of the remaining errors. Be sure you set the default API user to the one from above.
  14. Now you just need to add back all your modules and configure them.
  15. The module system changed now and the assigning of modules is now done on the Design->Layouts page instead of in the modules themselves. It is pretty self explanatory when you get to that page. So first install and configure the modules, then goto the layout area and assign them to the layouts you want.
  16. After you've assigned modules to the layout, goto the store front. Hit Ctrl+F5 a few times again and it should be good.
Things to Note:
  • 1.5.x 3rd party mods DO NOT WORK with 2.x. You will need to get updates from the authors. Or if you are done with the modules you can goto the admin/controller/modules folder on your site and delete older mods that are older than the majority of the module files. All the new modules files will have a similar date on them.
  • There are also some old 1.5.x core modules like "welcome" that have been replaced by the more generic "HTML Content". So these modules can also be deleted.
  • If you try to install or edit these you will see some errors about "overloading indirect property data..blah blah". That is how you know the module is no good.


User avatar


Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 0 guests