Post by straightlight » Sun Jun 26, 2016 2:06 am

In Opencart v2.2.0.0 release, using the $this->load->library versus the require / include returns an undefined property message from proxy while using the require / include doesn't and outputs the results normally. The library file has indeed sticked to the same library folder with both commands used.

The library() method from the system/engine/loader.php file may require revision.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by Johnathan » Wed Jun 29, 2016 9:54 pm

In OpenCart 2.1+, files in the /system/library/ folder are automatically loaded, which is why $this->load->library returns an error message. If you place a file in that folder, you don't need that statement (or an include or require command) in OpenCart 2.1 or later.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by straightlight » Wed Jun 29, 2016 10:10 pm

Johnathan wrote:In OpenCart 2.1+, files in the /system/library/ folder are automatically loaded, which is why $this->load->library returns an error message. If you place a file in that folder, you don't need that statement (or an include or require command) in OpenCart 2.1 or later.
That is correct. Although, it is yet to know why the system/engine/loader.php file still has the library method rather than being deprecated.

Edit: Found the answer. Since Opencart v2.2.0.0, the $loader->library is propagating the libraries from the new framework file.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Users browsing this forum: No registered users and 11 guests