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

#   First basic plugin: methods not triggered, why?

##

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago -  12 years 10 months ago [\#136303](#136303) by [majere](/forum/user/30181-majere "View majere's Profile")  *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#136303 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")* was created by *[majere](/forum/user/30181-majere "View majere's Profile")*

I'm new to Joomla/Hikashop plugin,
I followed the guide at [ www.hikashop.com/support/62-hikashop-dev...r-documentation.html](http://www.hikashop.com/support/62-hikashop-developer-documentation.html) and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:

1. I made a clone folder of /plugins/hikashop/history
2. I renamed this clone folder in /plugins/hikashop/credits
3. I renamed the xml file in /plugins/hikashop/credits/credits.xml
4. I renamed the php file in /plugins/hikashop/credits/credits.php
5. I opened credits.xml changing name tag, description and author tag, and the following tag: Code:

&lt;filename plugin="credits"&gt;credits.php&lt;/filename&gt;

6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it
7. I edited /plugins/hikashop/credits/credits.php like this: Code:

&lt;?php defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php class plgHikashopCredits extends JPlugin { function plgHikashopCredits(&amp;$subject, $config){ parent::__construct($subject, $config); } function onAfterOrderUpdate(&amp;$order,&amp;$send_email){ if(!empty($order-&gt;order_id)){ $db = JFactory::getDbo(); $query = $db-&gt;getQuery(true); $columns = array('value'); $values = array($db-&gt;quote('ugo3333')); $query -&gt;insert($db-&gt;quoteName('les_test')) -&gt;columns($db-&gt;quoteName($columns)) -&gt;values(implode(',', $values)); $db-&gt;setQuery($query); $db-&gt;query(); } return true; } }

The plugin does not work, the function is not triggered when updating an order satus.
My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.

So the problem is not my code, what am I doing wrong? Thanks a lot in advance.

Joomla version: 3.2.0
Hikashop version: last free edition

Last edit: 12 years 10 months ago by [majere](/forum/user/30181-majere "View majere's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDMwNi1maXJzdC1iYXNpYy1wbHVnaW4tbWV0aG9kcy1ub3QtdHJpZ2dlcmVkLXdoeT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

12 years 10 months ago [\#136322](#136322) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#136322 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Hi,

You don't mention anywhere in your message that you edited the xml file in order to adapt it to its new name. That's probably why it doesn't work in fact. Joomla looks into the xml to know which php file to launch. If you don't give him the correct, one, he will just ignore it.

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

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago [\#136328](#136328) by [majere](/forum/user/30181-majere "View majere's Profile")  Replied by *[majere](/forum/user/30181-majere "View majere's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#136328 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

sorry,
in my previous post I wrote that I edited 'credits.php' while instead I als edited 'credits.xml' changing plugin name and reference to php file:
&lt;filename plugin="credits"&gt;credits.php&lt;/filename&gt;
Plugin folder, XML file and php file have same name 'credits' and XML refers to credits.php file as shown above. Do I have to name the class inside the php file 'credits' too?
Thank you very much for the support!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDMwNi1maXJzdC1iYXNpYy1wbHVnaW4tbWV0aG9kcy1ub3QtdHJpZ2dlcmVkLXdoeT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

12 years 10 months ago [\#136330](#136330) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#136330 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Then everything looks correct to me.
It must be a stupid thing that you missed at one point but I don't see it in what you described. I would have done the same.

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

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago -  12 years 10 months ago [\#136334](#136334) by [majere](/forum/user/30181-majere "View majere's Profile")  Replied by *[majere](/forum/user/30181-majere "View majere's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#136334 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

I'll double check everything when I'll be back to work, hope to find the mistake soon

Last edit: 12 years 10 months ago by [majere](/forum/user/30181-majere "View majere's Profile").

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

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago [\#137559](#137559) by [majere](/forum/user/30181-majere "View majere's Profile")  Replied by *[majere](/forum/user/30181-majere "View majere's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#137559 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Hi again nicolas,
I found the problem, it was a stupid syntax php mistake inside my plugin.
Now the plugin works, but I'm not able to catch a particoular event, I need my custom code to be executed when the order has been payed using paypal. My paypal mayment method is set to change the status to 'confirmed' when the order is verified and to 'created' when the status of the order is pending.
I tried both: Code:

function onAfterOrderCreate(&amp;$order,&amp;$send_email) { if(!empty($order-&gt;order_id) &amp;&amp; ($order-&gt;order_status == "confirmed")) { --custom code--- }}

and Code:

function onAfterOrderUpdate(&amp;$order,&amp;$send_email) { if(!empty($order-&gt;order_id) &amp;&amp; ($order-&gt;order_status == "confirmed")) { --custom code--- }}

But my custom code is executed only when manually updating order status in administration panel of hikashop, even if the status was already on 'confirmed'.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDMwNi1maXJzdC1iYXNpYy1wbHVnaW4tbWV0aG9kcy1ub3QtdHJpZ2dlcmVkLXdoeT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

12 years 10 months ago [\#137565](#137565) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#137565 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Hi,

The onAfterOrderCreate trigger is not useful in your case.
The onAfterOrderUpdate trigger should be triggered when PayPal confirms the order too. The code you gave is correct. How do you know that your custom code is not working ? Because since it's PayPal server's which are confirming the order, it's normal that you don't see any message displayed on the website, and that you can't access the customer's session data in your custom code. I'm guessing that the issue is more something on that end because the trigger is always done and definitely done when PayPal confirms the order, otherwise, HikaSerial and HikaMarket wouldn't work properly.

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

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago -  12 years 10 months ago [\#137570](#137570) by [majere](/forum/user/30181-majere "View majere's Profile")  Replied by *[majere](/forum/user/30181-majere "View majere's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#137570 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Thank you so much,
the event is actually fired, i tested it writing an 'hello world' inside the db.
what doesn't work is the following:
The full $order object seems to be *null* when the event is fired from paypal, instead it is defined when manually updating the order status. Code:

if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){ return false; } $orderClass = hikashop_get('class.order'); $order = $orderClass-&gt;loadFullOrder($order-&gt;order_id);

I really need the full $order object because my custom code needs to be executed for each product in the cart and the cart array is only present inside the full $order object, I hope there is a workaround.
Thanks again in advance

Last edit: 12 years 10 months ago by [majere](/forum/user/30181-majere "View majere's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDMwNi1maXJzdC1iYXNpYy1wbHVnaW4tbWV0aG9kcy1ub3QtdHJpZ2dlcmVkLXdoeT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

12 years 10 months ago [\#137573](#137573) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#137573 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

That's normal. Look at the definition of loadFullOrder. You need to give the function a false on the third parameter if you want to skip the check on the current user or otherwise it will return null if the current user is not the owner of the order.

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

- **[majere](/forum/user/30181-majere "View majere's Profile")**
- [![majere's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar30181.png)](/forum/user/30181-majere "View majere's Profile") Topic Author
- [ Offline](/forum/user/30181-majere)

Less More

- Posts: 6
- Thank you received: 0
-
-
-

12 years 10 months ago [\#137625](#137625) by [majere](/forum/user/30181-majere "View majere's Profile")  Replied by *[majere](/forum/user/30181-majere "View majere's Profile")* on topic *[First basic plugin: methods not triggered, why?](/forum/31-development/864306-first-basic-plugin-methods-not-triggered-why#137625 "I'm new to Joomla/Hikashop plugin, I followed the guide at   www.hikashop.com/support/62-hikashop-dev...r-documentation.html  and i made a plain basic plugin that it doesn't seem to work, the same code put into the history plugin does work instead, probably i made some mistake during the install process:  1. I made a clone folder of /plugins/hikashop/history 2. I renamed this clone folder in /plugins/hikashop/credits 3. I renamed the xml file in /plugins/hikashop/credits/credits.xml 4. I renamed the php file in /plugins/hikashop/credits/credits.php 5. I opened credits.xml changing name tag, description and author tag, and the following tag:  6. I went in Joomla extension manager -&gt; discover -&gt; I discovered my credits plugin -&gt; I installed id and activated it 7. I edited /plugins/hikashop/credits/credits.php like this:  The plugin does not work, the function is not triggered when updating an order satus. My code DOES WORK if I paste it directly inside Hikashop History plugin inside its onAfterOrderUpdate function.  So the problem is not my code, what am I doing wrong? Thanks a lot in advance.  Joomla version: 3.2.0 Hikashop version: last free edition")*

Thanks it works perfectly now,
I don't see these information mentioned anywhere in the developer documentation page, i think you should add it as it's very useful.
Thank you again, you have a very good support!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NDMwNi1maXJzdC1iYXNpYy1wbHVnaW4tbWV0aG9kcy1ub3QtdHJpZ2dlcmVkLXdoeT90bXBsPW1hcmtkb3du) 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.189 seconds

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

[](#top)
