Page 1 of 2

OpenCart 2.3 Beta Available

Posted: Tue Jul 05, 2016 11:34 pm
by Heather
Hi everyone,

I'm happy to announce that we'll be releasing OpenCart version 2.3.0.0 very soon. The beta version has just been released over on GitHub - head over there if you'd like to take a look at the new version before it's full release.

Module developers - make sure to check your extensions to ensure that they still function properly with version 2.3.0.0.

As always, it's not recommended to use this version on a live store just yet as it's still a beta version. Please use OpenCart 2.2.0.0 or wait until the full release of OpenCart 2.3.0.0.

- Heather

Re: OpenCart 2.3 Beta Available

Posted: Wed Jul 06, 2016 12:57 am
by straightlight
Will this topic be opened for feedback? If not, could you address the official to where testers would be posting their analysis on this version?

Re: OpenCart 2.3 Beta Available

Posted: Wed Jul 06, 2016 1:07 am
by straightlight
In the admin/view/template/sale/order_form.tpl file,

the ... console.log has been added in the payment_address success response ... was this for troubleshooting reasons or it's expected for everyone?

Re: OpenCart 2.3 Beta Available

Posted: Wed Jul 06, 2016 1:18 am
by straightlight
For people who encountered passed issues with Opencart v2.2.0.0 API, here are the changelog fixes details:

http://forum.opencart.com/viewtopic.php ... 40#p627419

Re: OpenCart 2.3 Beta Available

Posted: Wed Jul 06, 2016 4:14 pm
by openmandrake
Hi.

Is there something like a changelog available, where the changes are listest?

Re: OpenCart 2.3 Beta Available

Posted: Fri Jul 08, 2016 5:33 am
by Qphoria
Ok Developers... this is what I've discovered so far....

GOOD NEWS
  • vQmod integration works fine so nothing to upgrade. Just remember to re-run the vQmod installer after upgrade.
  • Upgrade script "appeared" to work fine. I will dig deeper with it, but no errors on the surface (naturally, since I've maintained it 8) )
BAD NEWS
MAJOR EXTENSION CHANGES!!
ALL EXTENSIONS WILL NEED TO BE ADJUSTED!

Now there is an added directory layer for ALL extension types (module, payment, shipping, total, feed, etc)

OLD:
admin/controller/payment/xxx.php
admin/model/payment/xxx.php
admin/language/en-gb/payment/xxx.php
admin/view/template/payment/xxx.php

NEW:
admin/controller/extension/payment/xxx.php
admin/model/extension/payment/xxx.php
admin/language/en-gb/extension/payment/xxx.php
admin/view/template/extension/payment/xxx.php

This means that all your extensions will need to update the internal paths to things like
$this->load->model('module/mymod')
to
$this->load->model('extension/module/mymod')

and classnames from
ControllerModuleMyMod
to
ControllerExtensionModuleMyMod

This is true on both catalog and admin sides, all extensions, all supporting files (langs, tpls, etc).

GET STARTED NOW!

This also means you'll need a whole separate package for 2.3 since the files structure is different. No more conditionals based on version (unless you get really crafty ;) )

Re: OpenCart 2.3 Beta Available

Posted: Fri Jul 08, 2016 11:00 pm
by Johnathan
Daniel said he was going to include backwards compatibility so every extension didn't need to be rewritten. Did he do that, or is that scrapped? I seriously hope it made it on his priority list...

EDIT: So I just did some quick testing, and it looks like the fallback functionality is there, for the most part. You can upload extensions in the usual way, but there are a few bugs:

1. The title isn't pulled properly in the list of extensions

2. The extension appears at the end of the list (which isn't a big deal)

3. The user permissions aren't set correctly after clicking the "Install" button

4. The "Edit" button doesn't work because it goes to "route=extension/type/name" instead of just "route=type/name"

Other than that, it's working fine in my tests, which is a huge relief. Hopefully Daniel can get those bugs fixed before the official release.

Re: OpenCart 2.3 Beta Available

Posted: Sat Jul 09, 2016 4:04 am
by Qphoria
Johnathan wrote:Daniel said he was going to include backwards compatibility so every extension didn't need to be rewritten. Did he do that, or is that scrapped? I seriously hope it made it on his priority list...
Here's what I've seen...
when I upload an extension in the old format, if you are using "english" language folder, it won't load the language for the mod and just shows a duplicate of the previous title. if using the "en-gb" folder then it will show and let me install and edit. But when I go to save it says I do not have permission as you said.

I've actually created a vQmod script that gets called when the extension page is loaded and loops through and takes any extension folder/file that isn't in the "extension" subfolder, and it will edit the file and str_replace things like 'module/mymod' with 'extension/module/mymod'
ex.
$contents = file_get_contents($path);
$contents = str_replace('module/', 'extension/module/', $contents);
$contents = str_replace('ControllerModule', 'ControllerExtensionModule', $contents);
etc

and then saves the file back and moves it under the extension folder
Works great so far.. tho it is largely mapped to work with my mods as I use my own structure. But I have it looping through them all. Will save me the headache of having to update 200+ mods.

Code: Select all

foreach admin/catalog
    foreach module/payment/shipping/total
        foreach controller/model/language/view
            //do edits
        }
    }
}

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 3:07 pm
by slavib
Hello
Test version 2.3.0.0 beta 1
I have a module that works with 2.2.0.0
admin\controller\module\separate_products.php
admin\view\template\module\separate_products.php
admin\language\en-gb\module\separate_products.php
In my function public function install () is not implemented.
Do you know where the problem?

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 3:47 pm
by slavib
I changed paths

admin\controller\extension\module\separate_products.php
admin\view\template\extension\module\separate_products.php
admin\language\en-gb\extension\module\separate_products.php


I have the following load

Code: Select all

$this->load->language('extension/module/separate_products');
$this->load->model('extension/module');
$this->load->model('design/layout');
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('extension/module/separate_products.tpl', $data));
Now gives the following error
Fatal error: Uncaught Error: Class 'Controllerextensionmoduleseparateproducts' not found in /home/bg112co/public_html/test/test23b/system/storage/modification/system/engine/action.php:43 Stack trace: #0 /home/bg112co/public_html/test/test23b/system/storage/modification/system/engine/loader.php(24): Action->execute(Object(Registry), Array) #1 /home/bg112co/public_html/test/test23b/admin/controller/extension/extension/module.php(31): Loader->controller('extension/modul...') #2 /home/bg112co/public_html/test/test23b/system/storage/modification/system/engine/action.php(51): ControllerExtensionExtensionModule->install() #3 /home/bg112co/public_html/test/test23b/admin/controller/startup/router.php(26): Action->execute(Object(Registry), Array) #4 /home/bg112co/public_html/test/test23b/system/storage/modification/system/engine/action.php(51): ControllerStartupRouter->index() #5 /home/bg112co/public_html/test/test23b/system/engine/front.php(34): Action->execute(Object(Registry)) #6 /home/bg112co/public_html/test/test23b/system/eng in /home/bg112co/public_html/test/test23b/system/storage/modification/system/engine/action.php on line 43

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 4:41 pm
by slavib
Thanks for the post of Qphoria
Change

Code: Select all

ControllerModuleSeparateProducts
to

Code: Select all

ControllerExtensionModuleSeparateProducts
I have one more question

what is the right way

Code: Select all

$this->model_user_user_group->addPermission($user_group_id, 'access', 'module/separate_products');
or
$this->model_user_user_group->addPermission($user_group_id, 'access', 'extension/module/separate_products');
Then how to properly read rights

Code: Select all

$data['separate_permition'] = $this->user->hasPermission('access', 'module/separate_products');
or
$data['separate_permition'] = $this->user->hasPermission('access', ''extension/module/separate_products');

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 5:05 pm
by JNeuhoff
OK, while reading this forum thread, I was wondering about this:

In the past, it has been repeatedly pointed out by many OpenCart users and developers that we need stable OpenCart versions. OpenCart 2.2.0.0 was not one of them, we would have needed a bugfix version, e.g. 2.2.0.1. Instead, again we see an upcoming new release which may include some bugfixes, but also introduces new or changed features, and IMHO unnecessary changes which will probably introduce new bugs, and possibly break backward compatibility. This is NOT the way to go forward with OpenCart!

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 5:29 pm
by artcore
I have similar concerns.
A bugfix release is vital.

On another note; how many versions are developers going to maintain? One extension needs to support at least the latest 1.5 branch plus, now, four(!) 2.x versions counting from 2031. Sometimes you get lucky when not much has changed but for me, I have to divert a lot of time supporting all these branches. Not even considering the fact that you have to maintain that many demo installs as well. Kinda kills the creative juices!

A poll for which versions are mostly used would be helpful.

Also not looking forward to Twig.

Re: OpenCart 2.3 Beta Available

Posted: Mon Jul 11, 2016 6:59 pm
by straightlight
Creating a confirm method for each main controllers like the order totals has would be quite helpful from extensions in order to avoid on massively and constantly verify matching lines within the codes upon every Opencart releases so that every route can be monitored from the url class when an extension has been loaded in error.

Right now, no routes have been defined other than an error page which can complicate things when we have to troubleshoot the problem while having a confirm method for each extensions, the full path would be provided on anyhow either from the browser or from the error logs.

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 3:54 am
by Johnathan
Regarding older extension compatibility:

I worked on this today, and think I found a few minor edits that will work to get most extensions working. I submitted the edits to Daniel on Github, so hopefully he'll include them before the official version is released. If people want to test the edits out, that would be great, they're listed here:

https://github.com/opencart/opencart/issues/4645

They work so far in all my tests of my own extensions, but there might have been something else I've missed. Note that any code that loads built-in OpenCart model files will need to be adjusted, but that's not too major of a task. I did try and find a work-around for that, but couldn't find anything that worked in all situations.

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 4:00 am
by straightlight
Johnathan wrote:Regarding older extension compatibility:

I worked on this today, and think I found a few minor edits that will work to get most extensions working. I submitted the edits to Daniel on Github, so hopefully he'll include them before the official version is released. If people want to test the edits out, that would be great, they're listed here:

https://github.com/opencart/opencart/issues/4645

They work so far in all my tests of my own extensions, but there might have been something else I've missed. Note that any code that loads built-in OpenCart model files will need to be adjusted, but that's not too major of a task. I did try and find a work-around for that, but couldn't find anything that worked in all situations.
The only problematic with this methodology is that it would tend to merge the extensions with the core array being passed into the parameters. In order to merge arrays as such, it would need separated keys; such as: 'extension' and 'core' for troubleshooting purposes.

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 10:59 pm
by Johnathan
straightlight wrote:The only problematic with this methodology is that it would tend to merge the extensions with the core array being passed into the parameters. In order to merge arrays as such, it would need separated keys; such as: 'extension' and 'core' for troubleshooting purposes.
Can you provide an example where this causes an issue?

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 11:02 pm
by straightlight
Johnathan wrote:
straightlight wrote:The only problematic with this methodology is that it would tend to merge the extensions with the core array being passed into the parameters. In order to merge arrays as such, it would need separated keys; such as: 'extension' and 'core' for troubleshooting purposes.
Can you provide an example where this causes an issue?
This reply is more logic based since the concept has not been integrated into Opencart core. Although, it is kind of obvious that without separating the key subjects from the array that will be merged will be harden to track which contribution might be causing an issue versus the core array if both were to be merged together on the same dimensions.

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 11:10 pm
by straightlight
Another result I forgot to indicate above is the erroneous of an extension which could also be related to what the core needs to load and merging the results might even take longer to distinguish the source of the location from the assembled array tree on where the real cause of the problem might be compared to right now.

For instance, engines, helpers and libraries even though the poster might report something about an extension versus non-extensions subjects.

Re: OpenCart 2.3 Beta Available

Posted: Tue Jul 12, 2016 11:21 pm
by JNeuhoff
straightlight wrote: The only problematic with this methodology is that it would tend to merge the extensions with the core array being passed into the parameters. In order to merge arrays as such, it would need separated keys; such as: 'extension' and 'core' for troubleshooting purposes.
Could you please put it into plain English, so others can understand what you are talking about? And, if possible, provide an example?