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

#   modifyOrder() not working

##

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

Less More

- Posts: 5
- Thank you received: 0
-
-

10 years 3 months ago [\#244668](#244668) by [jose94h](/forum/user/43963-jose94h "View jose94h's Profile")  *[modifyOrder() not working](/forum/30-integrations/885402-modifyorder-not-working#244668 "Hello Hikashop Team.  I'm making a payment plugin integration. The only problem I have is that the function $this-&gt;modifyOrder($order&#95;id, $this-&gt;payment&#95;params-&gt;verified&#95;status, true, true); is not working and therefore the order status is not update. I know the onPaymentNotification is working fine and I'm receiving the POST variables because I'm using $this-&gt;writeToLog(&quot;testx&#92;n&quot;); function and I can see that. So to check where was the problem I put the writeToLog fuction after each line in the onPaymentNotification function, and I verified that the writeToLog after the first modifyOrder function is not printing and also the other writeToLogs after this modifyOrder function. It is like the modifyOrder acts like a loop. I would like your help with this.  Thank you.")* was created by *[jose94h](/forum/user/43963-jose94h "View jose94h's Profile")*

Hello Hikashop Team.

I'm making a payment plugin integration. The only problem I have is that the function $this-&gt;modifyOrder($order_id, $this-&gt;payment_params-&gt;verified_status, true, true); is not working and therefore the order status is not update. I know the onPaymentNotification is working fine and I'm receiving the POST variables because I'm using $this-&gt;writeToLog("testx\n"); function and I can see that. So to check where was the problem I put the writeToLog fuction after each line in the onPaymentNotification function, and I verified that the writeToLog after the first modifyOrder function is not printing and also the other writeToLogs after this modifyOrder function. It is like the modifyOrder acts like a loop.
I would like your help with this.

Thank you.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 3 months ago [\#244672](#244672) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[modifyOrder() not working](/forum/30-integrations/885402-modifyorder-not-working#244672 "Hello Hikashop Team.  I'm making a payment plugin integration. The only problem I have is that the function $this-&gt;modifyOrder($order&#95;id, $this-&gt;payment&#95;params-&gt;verified&#95;status, true, true); is not working and therefore the order status is not update. I know the onPaymentNotification is working fine and I'm receiving the POST variables because I'm using $this-&gt;writeToLog(&quot;testx&#92;n&quot;); function and I can see that. So to check where was the problem I put the writeToLog fuction after each line in the onPaymentNotification function, and I verified that the writeToLog after the first modifyOrder function is not printing and also the other writeToLogs after this modifyOrder function. It is like the modifyOrder acts like a loop. I would like your help with this.  Thank you.")*

Hi,

Without knowing the context we cannot provide you any useful answer.
Now, the "modifyOrder" function is working perfectly fine because that function is used by all the HikaShop plugins.

If you give the function an order id, it will update the order in the database (using the save function and it will call the triggers).
If you give the function an order object, it will update the object and let you perform the save afterwards.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 282
- Thank you received: 42
-
-

6 years 5 months ago -  6 years 5 months ago [\#318543](#318543) by [oxido](/forum/user/29793-oxido "View oxido's Profile")  Replied by *[oxido](/forum/user/29793-oxido "View oxido's Profile")* on topic *[modifyOrder() not working](/forum/30-integrations/885402-modifyorder-not-working#318543 "Hello Hikashop Team.  I'm making a payment plugin integration. The only problem I have is that the function $this-&gt;modifyOrder($order&#95;id, $this-&gt;payment&#95;params-&gt;verified&#95;status, true, true); is not working and therefore the order status is not update. I know the onPaymentNotification is working fine and I'm receiving the POST variables because I'm using $this-&gt;writeToLog(&quot;testx&#92;n&quot;); function and I can see that. So to check where was the problem I put the writeToLog fuction after each line in the onPaymentNotification function, and I verified that the writeToLog after the first modifyOrder function is not printing and also the other writeToLogs after this modifyOrder function. It is like the modifyOrder acts like a loop. I would like your help with this.  Thank you.")*

As a future info for me and others ![:P](/media/kunena/emoticons/15.png ":P")

To be able to use the function **modifyOrder()**, you need to extend hikashopPaymentPlugin.
So when you create your plugin, don't use Code:

class PlgHikashopMyplugin extends JPlugin

do it like this Code:

class PlgHikashopMyplugin extends hikashopPaymentPlugin

Last edit: 6 years 5 months ago by [oxido](/forum/user/29793-oxido "View oxido's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

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

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

[](#top)
