Our webocreation.com is still in opencart v2.3 and today we are upgrading to opencart version 3.0.3.1 live. So that it will be pressure for us to complete it. We are able to upgrade in 1hrs and fix problems to go through the normal ordering. Previously we were using Journal version 2 and now we are using journal version 3.
Be prepared with the following:
- Make a backup of every file and folder and the database.
- Download the latest version of OpenCart, right now it is 3.0.3.2
- Download the Journal theme version 3
- Download the demo data of the Journal theme
- Login to admin and disable the custom theme and set up the default theme of OpenCart so there are no conflicts.
- Upload all the latest version Opencart files and folders to your server and go to your store URL, it mostly gives errors unless it is a minor version update.
- Rename the Vqmod folder to something else as it may contain .xml files which give errors in major version upgrades.
- Rename the journal-cache folder also if you have.
- Remove all .xml files except modification.xml inside system/ folder
- Go to system/storage/cache folder and delete all files and folder except index.html, similarly go to system/storage/modification and delete all files and folder except index.html, likewise, go to system/storage/upload and delete all files and folder except index.html. It means the need to remove all the cache and file modifications that are in the system/storage of Opencart 2.
- Then run YOURSTOREURL/install in your browser
- You will see some notice, if you re-run then it will be resolved automatically.
- Install the Opencart in the subfolder so that it will be easy to copy and paste in the config.php and get the files and folder as needed. This is extra steps but will be helpful to debug if something went wrong.
- Update your config.php and admin/config.php as required as mostly, it missed the DIR_STORAGE constant.
- Then go to the directory of DIR_STORAGE and upload files and folders to match the DIR_STORAGE folder of your demo sub-folder installation. Or you can download the following and extract and upload all files and folders to your store DIR_STORAGE path.
- Download DIR_STORAGE files.
- Some time upgrade code is not able to create the files and folders for the DIR_STORAGE so we have to upload it manually.
- If you see errors then it is because of non-upgraded extensions, so find them out and disable them.
- Then verify all of your extensions if they are enabled as mostly they got disabled when a major version upgrade is done.
- Check for modules, shipping, payments, and Order totals likewise other Analytics, Captchas, etc
- Don’t forget to delete Journal2 folders in admin and in catalog likewise in the system folder. Similarly, remove all .tpl files will be a good idea.
- Happy Upgrading and hope it went smooth on your side.
Read: Learn Journal theme coding by example
Things to consider:
- SEO URL alias is not transferred properly. So you have to transferred manually or write SQL code to transfer from the oc_url_alias to oc_seo_url, as now in OpenCart 3.0.3.1 the SEO URL is also stored specific and language-specific.
- None of the Journal settings and configuration are transferred so if you have a unique design then you have entered them manually.
- Most of the modules get disabled so need to enabled again.
- Theme will show two default theme so need to disabled both and enable whichever works as this is because there are existing files of Opencart 2
Some of the error we fixed while we upgrade the OpenCart and Journal theme:
SyntaxError: Unexpected token < in JSON at position 0 parsererror Notice: Undefined variable: affiliatee in /public_html/install/model/upgrade/1009.php on line 23{“success”:”Patch 1009 has been applied (10 of 10)”,”next”:”index.php?route=upgrade\/upgrade\/next&step=11″}
-Re-run the install
Warning: fopen(DIR_STORAGElogs/openbay.log): failed to open stream: No such file or directory in /public_html/system/library/log.php on line 22Warning: fopen(DIR_STORAGElogs/error.txt): failed to open stream: No such file or directory in /public_html/system/library/log.php on line 22Warning: Use of undefined constant DIR_STORAGE – assumed ‘DIR_STORAGE’ (this will throw an Error in a future version of PHP) in /public_html/admin/controller/startup/sass.php on line 7Warning: include_once(DIR_STORAGEvendor/scss.inc.php): failed to open stream: No such file or directory in /public_html/admin/controller/startup/sass.phpon line 7Warning: include_once(): Failed opening ‘DIR_STORAGEvendor/scss.inc.php’ for inclusion (include_path=’.:/opt/alt/php72/usr/share/pear’) in /public_html/admin/controller/startup/sass.php on line 7
- First, remove the cache which is in system/storage of OpenCart 2
- Define the DIR_STORAGE constant at the config.php and provide the right path.
- If you are confused which path to provide then install an Opencart in sub-folder and log in which will redirect you to define the storage folder. With this default setup, now you can see its config.php and admin/config.php and do the same for your store config.php and admin/config.php. This is one way.
Warning: fopen(/v3storage/cache/cache.catalog.language.1557105242): failed to open stream: No such file or directory in /public_html/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /public_html/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in /public_html/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /public_html/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /public_html/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in /public_html/system/library/cache/file.php on line 59Warning: fopen(/v3storage/cache/cache.currency.1557105242): failed to open stream
- Upload the cache folder, download, logs, modification, session, upload, vendor files, and folder.
- You can download here as well, which is the basic files and folder of the OpenCart installation
Error: A theme has not been assigned to this store!
You can fix the error by referring to this post as it contains some steps to solve it.
Notice: Undefined variable: _SESSION in /public_html/catalog/controller/extension/module/v2pagecache.php on line 13Error: A theme has not been assigned to this store!
In our case, most of the modules were disabled when we upgraded to OpenCart 3. Thus we re-installed modules, theme, Order Totals, payment and shipping also.
Journal Theme Installation Error
Make sure you have refreshed Opencart Modifications.
This is straight forward, go to admin>> Extensions >> Modifications and click the refresh button.
Let us know your upgrade process and issues if you got any.