- Posts: 7
- Thank you received: 1
Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.
5 years 11 months ago #324252
by joom_dev
Hi,
I am trying to create a plugin where the order information will be sent to a 3rd party api after every successful order.
I know I can't use the OnAfterOderConfirm since that's only available for primary payment and shipping method plugins.
So, I wanted to use onAfterOrderUpdate function to catch all orders on update and it's not working as expected. I created a plugin for group hikashop, installed and enabled it and no avail.
PHP gist.github.com/chetanmadaan/7389c716c1edd3280c7228a25be1fa9a
XML: gist.github.com/chetanmadaan/d02ec03537f5f139dd364a71f58fdbc1
The file that triggers this plugin:
/administrator/components/com_hikashop/classes/order.php:474 does seem to have the correct trigger and if I print the $order there, it shows the array.
Can you see if I am doing anything wrong here?
Thank you,
Chetan
I am trying to create a plugin where the order information will be sent to a 3rd party api after every successful order.
I know I can't use the OnAfterOderConfirm since that's only available for primary payment and shipping method plugins.
So, I wanted to use onAfterOrderUpdate function to catch all orders on update and it's not working as expected. I created a plugin for group hikashop, installed and enabled it and no avail.
PHP gist.github.com/chetanmadaan/7389c716c1edd3280c7228a25be1fa9a
XML: gist.github.com/chetanmadaan/d02ec03537f5f139dd364a71f58fdbc1
The file that triggers this plugin:
/administrator/components/com_hikashop/classes/order.php:474 does seem to have the correct trigger and if I print the $order there, it shows the array.
Can you see if I am doing anything wrong here?
Thank you,
Chetan
Please Log in or Create an account to join the conversation.
5 years 11 months ago #324254
by nicolas
Replied by nicolas on topic Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.
Hi,
The class of your plugin is incorrect and thus your plugin is ignored by Joomla.
Since your plugin is of the group "hikashop" and not "hikashoppayment", the class should be plgHikashopXxx and not plgHikashoppaymentXxx
The class of your plugin is incorrect and thus your plugin is ignored by Joomla.
Since your plugin is of the group "hikashop" and not "hikashoppayment", the class should be plgHikashopXxx and not plgHikashoppaymentXxx
Please Log in or Create an account to join the conversation.
5 years 11 months ago #324260
by joom_dev
Replied by joom_dev on topic Plugin events "onAfterOrderUpdate" and "onAfterOrderCreate" not working.
That did it. Thank You!
Please Log in or Create an account to join the conversation.
Time to create page: 0.172 seconds