[Skip to main content](#vessel-content)

#   Plugin not triggered

##

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153665](#153665) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153665 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")* was created by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")*

Hi,

I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... ![:(](/media/kunena/emoticons/22.png ":(")

The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?

Thanks for any clue that will make this plugin work! I've attached the php and xml files.

Michel

*This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

12 years 6 months ago [\#153667](#153667) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153667 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

The onAfterOrderConfirm function is triggered on the end step of the checkout after the customer clicked on the finish button and confirmed that he wanted to checkout so that payment plugins can redirect the customer to the payment gateway.
So it's normal that it isn't triggered when an order is confirmed.
What you want to use is the onAfterOrderUpdate trigger which is called each time an order is changed and check on the order_status attribute.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153703](#153703) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153703 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

Thanks for the reply. I don't want to create an invoice each time the order is udated, only when the order is finalized by the customer. I want the order data to be sent to my invoicing service after the customer clicks the finish button. From what I understand that would be the onAfterOrderConfirm function.

But that is not the problem I'm having. The problem is, that no function in my plugin is ever triggered. For testing purposes I had implemented the onAfterOrderUpdate but this also never got called. So there must be some basic problem in the installation or the code. I'd appreciate it if you could have a look where the problem lies.

Thanks,
Michel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

12 years 6 months ago [\#153708](#153708) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153708 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

The issue is with your class name. you use the class name plgHikashopSmallInvoice while your plugin name is: plgHikaShopSmallInvoice
If you look at a plugin of HikaShop, for example the validate_free_order plugin (it's his name as entered in the xml file), the class name is: plgHikashopValidate_free_order

So either you rename your plugin to smallInvoice, or you change the class name to: plgHikashopPlgHikashopSmallInvoice and the the plugin will be triggered.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153779](#153779) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153779 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

Ok, so I've configured everything as follows:

filenames in zip file:
smallinvoice.php and smallinvoice.xml

class name:
class plgHikashopSmallinvoice extends JPlugin

in the xml file:

&lt;files&gt;
&lt;filename plugin="smallinvoice"&gt;smallinvoice.php&lt;/filename&gt;
&lt;/files&gt;

But it's not triggered...

Thanks,
Michel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 6 months ago [\#153832](#153832) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153832 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

That code seems to be correct, but the function you use "dumpMessage()" is not a valid function.

Do you have enable the debug mode in Joomla and set the error reporting to "maximum" ?
Thanks to try to display a system message thanks to the code: Code:

$app = JFactory::getApplication(); $app-&gt;enqueueMessage('Test');

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153883](#153883) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153883 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

dumpMessage() is from the J!Dump plugin that I have installed to try to track what's going on, but it seems as if none of the functions in the plugin ever get called. I have added a call to function onAfterCartUpdate to test this and placed the enqueueMessage code above in it, but this also never gets called. I'm really getting desperate ![:-(](/media/kunena/emoticons/22.png ":-(")....
Thanks for helping me out!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153893](#153893) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153893 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi again,

I've added a contructor to see if it gets called:
Code:

function plgHikashopSmallinvoice (&amp;$subject, $config) { $app = JFactory::getApplication(); $app-&gt;enqueueMessage('Test'); parent::__construct($subject, $config); }

...but here also: no reaction. It seems as if the plugin is not loaded....

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

12 years 6 months ago [\#153925](#153925) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153925 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Put your debug at the beginning of the file, before the class definition.
If you see the debug, it means that the file of the plugin is called but that the class name is not correct.
If you don't see the debug, it means that the plugin is not enabled, not with the correct name in the xml, or something like that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153946](#153946) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153946 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Ok, I was able now to see that my plugin is called. Also the call to the function onAfterCartUpdate is working.
However onAfterOrderConfirm never gets called. All my functionality is in the onAfterOrderConfirm, since I need all the order data after the customer has confirmed his purchase.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")**
- [![bmichu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32093-bmichu "View bmichu's Profile") Topic Author
- [ Offline](/forum/user/32093-bmichu)

Less More

- Posts: 71
- Thank you received: 0
-
-

12 years 6 months ago [\#153951](#153951) by [bmichu](/forum/user/32093-bmichu "View bmichu's Profile")  Replied by *[bmichu](/forum/user/32093-bmichu "View bmichu's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153951 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hi,

I'm one step further now: i've put the code in the onAfterOrderUpdate and check for the status of the order like this:
Code:

if($order-&gt;order_status =='confirmed')

Is this the correct way to do it? Our goods are delivered without advance payment. We put an invoice with the goods, so there is no payment effectuated (I have activated the bank payment plugin).
What I'm wondering is why in the API description it is mentioned that the onAfterOrderConfirm function is called when the order is created at the end of the checkout. This does not seem to be the case, at least in my plugin this method is never called. Or ist this only valid inside a hikashoppayment plugin?

Thanks,
Michel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 6 months ago [\#153966](#153966) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Plugin not triggered](/forum/31-development/867721-plugin-not-triggered#153966 "Hi,  I've created a plugin to transfer the order details to a an online invoice system. I've packaged the plugin in a zip and installed it through the extension manager. I've also checked if the plugin is activated. SO all should be well, but it's not ... :(  The function onAfterOrderConfirm doesn't seem to get triggered. What am I doing wrong or forgetting?  Thanks for any clue that will make this plugin work! I've attached the php and xml files.  Michel")*

Hello Michel,

> Is this the correct way to do it? Our goods are delivered without advance payment. We put an invoice with the goods, so there is no payment effectuated (I have activated the bank payment plugin).

Using the **onAfterOrderUpdate** function will probably do the job and as Nicolas said :

> The onAfterOrderConfirm function is triggered on the end step of the checkout after the customer clicked on the finish button and confirmed that he wanted to checkout so that payment plugins can redirect the customer to the payment gateway.
> So it's normal that it isn't triggered when an order is confirmed.
> What you want to use is the onAfterOrderUpdate trigger which is called each time an order is changed and check on the order\_status attribute.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NzcyMS1wbHVnaW4tbm90LXRyaWdnZXJlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.075 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
