Post by narcisskylake » Thu Feb 29, 2024 7:41 pm

I have tried creating an event hook, but still can't get it to work.
I need the order details (customer, products, etc.) to be passed on an external api.
I've tried looking all over but can't find any article where it helps you go through step by step on how to create a custom event.
Most are outdated, and I am out of options but to ask for your help for a detailed explanation or take a look over what I currently have

I'm using OpenCart 4.0.2.3
I attached what I have been trying.

Attachments


Newbie

Posts

Joined
Fri Oct 20, 2023 12:37 pm

Post by straightlight » Sat Mar 02, 2024 10:06 am

Your event parameters should not use affected types with your referenced variables. The conventional name you use for the filename: callExternalApi with the controller name is also unmatched, both, on the admin and the catalog-end. It should be: call_external_api.php based on the conventional name you provided on the controller extended classes with the namespaces and also on the admin install() and uninstall() callExternalApi you're using.

For further analysis with the events, you can also test them by using the debug event.

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 3 guests