Post by linetrace » Fri Aug 18, 2017 8:00 am

I have successfully upgraded a relatively basic OpenCart 2.3.0.2 installation to OpenCart 3.0.2.0 and wanted to document the process.

Upgrading OpenCart from 2.3.0.2 to 3.0.2.0:

DO NOT try to follow the upgrade.txt file. Enough has changed internally from 2.3.x to 3.0.x that all themes, modifications, and any other extensions will need to be upgraded separately (and few have been updated to support 3.0.x yet anyway) Instead, do the following:
  • Back up your OpenCart installation and your database! (The database can easily be backed up from within OpenCart)
  • Document which themes, modifications, and other extensions you have installed and what their settings are (the latter can be a time consuming process, but internal setting variable names have changed, so you will lose most of your extension settings; if you can clone your installation & database so you're upgrading a copy and can compare settings, that will make it easier, but may not be feasible in all cases)
  • Check to see if the themes/modifications/and extensions you use have been updated to support 3.0.x. If they haven't, be prepared to modify them yourself (if you have the ability and the source code is available) or contact their respective developers prior to upgrading (again, most have not been updated yet)
  • Install a fresh copy of OpenCart 3.0.2.0, copying over your 'config.php', 'admin/config.php' and any other relevant files (preferably, modify your config files to point at a copy of your database).
  • Browse to http://<yourstore.com>/install Replacing "<yourstore.com>" with your actual site (and subdirectory if applicable).
  • Click "Upgrade", hopefully you won't see any errors (if you do, search here on the forums)
  • If you are installing 3.0.2.0 (or 3.0.2.1beta) and want email notifications to work, you'll need to apply the SQL from the OC 3.0.2.0 Email Issues thread to add the appropriate events (hopefully newer versions will have this fixed)
  • Go to Admin > Users > User Groups and Edit the "Top Adminstrator" group. Check All boxes and click Save
  • Go to Admin > System Settings, Edit the settings for your store(s), and click Save (you'll probably also have to change your error log file name from 'error.txt' to 'error.log' for it to save successfully).
  • Go through the your themes, modifications, and other settings, re-installing (as necessary), re-enabling, and re-applying settings as appropriate (again, most of those settings will appear to have been lost due to internal variable name changes).
  • Start testing & fixing any issues.
  • Follow the prompts/instructions in the admin dashboard to move your 'system' directory to a more secure location.
That's just the gist of it, so have as many backups as you can, try to work on a copy if at all possible, and report here if you have any additional suggestions or advice.

Upgrading Themes & Extensions from 2.3.0.2 to 3.0.2.0:

And, I also wanted to document what I found in upgrading my theme and some extensions to support 3.0.x (of course, there's now a built-in theme editor, so you may be able to just modify the default theme using that instead of upgrading a theme):
  • The template format has changed from PHP-based '.tpl' files to the '.twig' format. The .tpl format is still supported, but you can't mix .tpl & .twig in the same theme or extension (and remember that missing theme files will fail over to the default theme, so that counts as being part of the same theme). The format is pretty straightforward and relatively easy to convert (and will save you keystrokes going forward)
  • In your controllers, you'll need to make sure to remove any calls that include the '.tpl' extension (because it'll determine which type exists)
  • In your admin controllers, you'll need to change any URLs which contain 'extensions/extensions' to 'marketplace/extensions' (the paths changed)
  • In your controllers, you'll need to change any 'token' parameters to 'user_token' (the parameter name changed)
  • In your controllers & templates, you'll need to change any settings variables so they're prefixed with the appropriate extension type (e.g. 'mytheme_' should become 'theme_mytheme_', 'mytotal_' should become 'total_mytotal_', etc.; this is especially important for the '_status' & '_sort_order' settings as various parts of admin interface & other functionality now rely on them being named thusly, so 'mytheme_status' must become 'theme_mytheme_status', 'mytheme_sort_order' must become 'theme_mytheme_sort_order', etc.) This is why your themes/modifications/extensions all get disabled upon upgrading from 2.3.x to 3.0.x and why all their settings appear to be lost.
There are naturally going to be some other changes required, but these are the biggest ones to watch out for (that I ran across, anyway). Please chime in here if you know of others.

Newbie

Posts

Joined
Sat Aug 05, 2017 4:42 am
Location - Winooski, VT, US

Post by definedhosting » Tue Aug 22, 2017 3:37 am

Wish I'd read this first!
Another thing to look out for is the theme editor. I'm trying to upgrade a site using journal2 theme. Loading the theme editor I'm presented with the default themes code not journal2's. Not sure if this is a bug with the theme editor or the theme... But something to watch out for..... Any ideas?


Posts

Joined
Tue Aug 22, 2017 12:20 am

Post by linetrace » Tue Aug 22, 2017 10:40 pm

I wish I had read this first too, that's why I ultimately put it together.

Unfortunately, I'm unfamiliar with the Journal2 theme and whether it supports OC 3.0.x or not. If it doesn't, it might be still using .tpl files and/or not using the same view structure that the default theme uses, so the theme editor might be failing to find the files and so defaulting to show the files from the default theme.

Newbie

Posts

Joined
Sat Aug 05, 2017 4:42 am
Location - Winooski, VT, US

Post by Daniel » Tue Sep 19, 2017 4:24 pm

it will alter the files for what ever theme you have setup for that store.

OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by somjai007 » Wed Sep 20, 2017 11:38 am

Thanks for the info


gclub

Newbie

Posts

Joined
Sun Sep 10, 2017 3:06 pm

Post by Benville » Tue Oct 24, 2017 1:40 pm

So. Basically what yiure saying is is just install 3.0.2.0 over the top of 2.3, then sort mods afterwards?

New member

Posts

Joined
Fri Mar 04, 2016 7:01 pm

Post by linetrace » Tue Oct 24, 2017 6:17 pm

Benville wrote:
Tue Oct 24, 2017 1:40 pm
So. Basically what yiure saying is is just install 3.0.2.0 over the top of 2.3, then sort mods afterwards?
Nope, you need to install a fresh copy of 3.0.2.0, preserving only your config file & database. Documenting your themes, mods, settings, etc., is imperative as all that stuff won't be preserved. If you copy the 3.0.2.0 files over your existing 2.3 install, as the bundled install.txt file suggests, you're going to have a bad time.

Good luck,

Morgan

Newbie

Posts

Joined
Sat Aug 05, 2017 4:42 am
Location - Winooski, VT, US

Post by duccccky » Thu Oct 26, 2017 10:15 pm

what would you suggest if I did the upgrade like this but now I get the following:

Theme says heading_title
and the public page says: Error: A theme has not been assigned to this store!

I went thru all the files and they look correct. I've even enabled and disabled my only language - English - as well.

New member

Posts

Joined
Fri Oct 20, 2017 9:08 pm

Post by straightlight » Fri Oct 27, 2017 12:18 am

This issue is due to missing keys from the setting table on the database caused by the upgrade script due to a highly amended resource that the upgrade process needs and for your server that can't provide. From your database backup, capture the setting table's entire insert queries. Then, truncate your setting table from the current setting database table. Lastly, paste the captured insert queries from your setting backup table into your SQL tab in PHPMyAdmin by also ensuring the database table prefix names are correct. Then, launch the query. This should rectify the problem.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by duccccky » Fri Oct 27, 2017 5:52 am

straightlight wrote:
Fri Oct 27, 2017 12:18 am
From your database backup, capture the setting table's entire insert queries. Then, truncate your setting table from the current setting database table. Lastly, paste the captured insert queries from your setting backup table into your SQL tab in PHPMyAdmin by also ensuring the database table prefix names are correct. Then, launch the query. This should rectify the problem.
OK I'll be honest. My knowledge of working in PHPMyAdmin is limited. I know how to use the SQL tab to insert things, but I'm not exactly sure how to capture the insert queries. I don't want to make matters worse and do the process wrong.

New member

Posts

Joined
Fri Oct 20, 2017 9:08 pm

Post by straightlight » Fri Oct 27, 2017 5:54 am

PM sent.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by PanCan » Sun Nov 12, 2017 12:42 am

OK, I've done the fresh install and the "upgrade" thing worked properly, I get my Admin login page, but once I login I'm getting the following error message.
Warning: fopen(/home/panaderi/storage/logs/openbay.log): failed to open stream: No such file or directory in /home/panaderi/public_html/system/library/log.php on line 22Warning: fopen(/home/panaderi/storage/logs/openbay.log): failed to open stream: No such file or directory in /home/panaderi/public_html/system/library/log.php on line 22Warning: fclose() expects parameter 1 to be resource, boolean given in /home/panaderi/public_html/system/library/log.php on line 39Warning: fopen(/home/panaderi/storage/logs/error.log): failed to open stream: No such file or directory in /home/panaderi/public_html/system/library/log.php on line 22Warning: include_once(/home/panaderi/storage/vendor/scss.inc.php): failed to open stream: No such file or directory in /home/panaderi/public_html/admin/controller/startup/sass.php on line 7Warning: include_once(): Failed opening '/home/panaderi/storage/vendor/scss.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/panaderi/public_html/admin/controller/startup/sass.php on line 7
I'm guessing that I need to do the whole truncate-database thing as mentioned above, but I am completely clueless as to how that is supposed to work. Please help!

Newbie

Posts

Joined
Sat Nov 11, 2017 7:05 am

Post by Thomas283 » Mon Jan 29, 2018 6:06 pm

@PanCan: it show permission denied which means that the indicated log file is unable to write on your storage folder. Pls try set write permission for that folder. Hope that help.

WooCommerce to OpenCart: Migrate everything from WooCommerce to OpenCart
Prestashop to OpenCart: Migrate everything from Prestashop to OpenCart


User avatar
Newbie

Posts

Joined
Tue Jan 09, 2018 5:50 pm

Post by elprince » Wed Jan 31, 2018 1:25 am

In all my upgrades from 2012 I'm creating new installation and keep only configs and database to avoid any file conflict but this time I'm upgrading from 2.3 to 3.2 and it never work I faced two main issues and after I give-up and start googling for a solution i found this helpful discussion and hope to find a solution here

1- while upgrading database in patch 9 which is related to affiliate i think i got the following error message

''SyntaxError: Unexpected token < in JSON at position 0 OK Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/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"}''

And I fixed this by removing two affiliate tables in database before upgrade but this is not the ideal solution as i lost some data by doing this !!

2- which is already reported here before which is

""Theme says heading_title
and the public page says: Error: A theme has not been assigned to this store!""

I follwed the suggested solution step by step but wasn't successfule beside this when i brows the front end and try to place an order it never work probably and wasn't able to place an order as every time i log in and press checkout it direct me to cart and even the voucher and reward section not shown and when i press checkout again it log me out and give an embety cart
So I imported a clean fresh OC 3.0.2 setting table and imported it to the upgraded one but still the issues exist

Any Idea or support or step by step to fix the setting will be really highly appreciated.

Newbie

Posts

Joined
Sun Oct 20, 2013 9:40 pm

Post by Printopia » Thu Feb 01, 2018 3:08 pm

elprince wrote:
Wed Jan 31, 2018 1:25 am

1- while upgrading database in patch 9 which is related to affiliate i think i got the following error message

''SyntaxError: Unexpected token < in JSON at position 0 OK Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/install/model/upgrade/1009.php on line 23Notice: Undefined variable: affiliatee in /home/elprince/public_html/sandbox/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"}''
Ran into the same problem, and this is an error in the 1009.php upgrade file.

http://opencart.com/forum/viewtopic.php?f=199&t=201445

Newbie

Posts

Joined
Fri Mar 04, 2016 11:35 pm

Post by motion2082 » Tue Feb 13, 2018 6:57 pm

This guides sucks, can't believe it's the No #1 hit on Google

Active Member

Posts

Joined
Tue May 12, 2015 8:48 pm

Post by straightlight » Wed Feb 14, 2018 6:45 am

motion2082 wrote:
Tue Feb 13, 2018 6:57 pm
This guides sucks, can't believe it's the No #1 hit on Google
Perhaps you could un-suck it by providing more information regarding the related issue you might be experiencing or even complete error messages that you notice on your browser.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by rahulrakesh » Wed Apr 11, 2018 1:08 am

linetrace wrote:
Fri Aug 18, 2017 8:00 am
I have successfully upgraded a relatively basic OpenCart 2.3.0.2 installation to OpenCart 3.0.2.0 and wanted to document the process.
Thanks for documenting this. I was initially confused when you said fresh install and upgrade in the same line but was later able to figure it out.
I have done the upgrade but have run into an issue. All the images for my products have just disappeared. Do I need to copy any folder from the previous installation which contains the images?

Newbie

Posts

Joined
Sat Nov 25, 2017 12:38 pm

Post by sdancer75 » Mon Apr 16, 2018 3:46 am

.:Steps I followed (Under version 2.3.x I had enabled the ThemeGlobalLite theme) for a successfull upgrade to version 3.0.2:

1) I deleted /system/storage/modification except index.html
2) I deleted default_theme.php from /admin/controller/extension/theme
3) I deleted google_analytics.php from /admin/controller/extension/analytics
4) I deleted also basic_captcha.php & google_captcha.php from /admin/controller/extension/captcha
5) I edited the patch file install/model/upgrade/1009.php and replaced the misspelled 'affiliatee' to 'affiliate' (edit with notepad and search for the misspelled affiliatee word)
6) I run the installation wizard ie www.mydomain.com/install
7) After successful install, I deleted cookies, cache etc from my browser
8) Inside admin page I changed the "System|Users|Users Group" and "Administrators Group" in both access/edit permissions to [select all]. Now you can see the "extension" option at the main menu.
9) From Extenstion | Themes [Edit], I selected "default" for the "Theme Directory" and "Status" as "Enabled"
10) Under System and Store Settings save your settings even nothing have been changed !

From now on your OpenCart version 3.0.2 will be working without problems using the default theme. Install a compatible OC theme.

This solution is included to the full OpenCart audio/visual tutorial guide (unfortunately only in Greek Voice/subtitle language. Maybe it supports english subtitles in the near future) at http://www.paradoxinteractive.gr/%CF%80 ... /opencart/

Image

Newbie

Posts

Joined
Sun Nov 27, 2016 11:52 pm

Post by NZSD » Mon Apr 16, 2018 7:14 am

sdancer75 wrote:
Mon Apr 16, 2018 3:46 am
.:Steps I followed (Under version 2.3.x I had enabled the ThemeGlobalLite theme) for a successfull upgrade to version 3.0.2:
...
This seems way simpler than the original post, for someone like me who only knows enough to be dangerous lol excuse what may be the obvious question - I just want to confirm that did you install 3.0.2.0 over the top of 2.3.02 files ? and presumably you had to update all the modifications to v3's after install ?

Thanks in Advance for your help
Carolyn

User avatar
Newbie

Posts

Joined
Tue Jan 09, 2018 9:54 am

Who is online

Users browsing this forum: No registered users and 7 guests