Post by tri1976 » Tue Dec 29, 2015 8:05 pm

Is this Events (script notifications) 2.1 working in opencart I tried to follow the instruction for setting the trigger as described in the document (application / type / folder / file / method / before or after) and it doesn't seem to work. Can someone give a working example of trigger and action for this new system? Thanks.

email: trile7 at gmail dot com
Checkout My Extensions

User avatar
New member


Mon Mar 08, 2010 2:48 am

Post by open4dev » Wed Jan 06, 2016 5:11 pm

I could not make it work either, at least not with the extra trigger parameter types.

I was only able to call a registered event listener using a normal route i.e. like:

Code: Select all

$this->model_extension_event->addEvent('my_theme', 'post.order.history.add', my_module/my_controller/my_method');
When the event post.order.history.add will be triggered, then the system/event will try to invoke a controller where:
- the application type is specified by the place where the event is being triggered (i.e. catalog for orders)
- the controller class is expected to reside in the folder: catalog/controller/my_module/my_controller.php. The class inside that file should be named with lowercase i.e. ControllerMy_moduleMy_controller and inside that class there should be a method named my_method that takes as many parameters as specified in the code when the event is triggered.

At least this is what I got so far.

open4dev (extensions page)



Fri Oct 24, 2014 1:52 pm
Who is online

Users browsing this forum: No registered users and 40 guests