VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: m.davide82 on April 22, 2020, 09:44:23 AM

Title: Virtuemart webhook to change order status
Post by: m.davide82 on April 22, 2020, 09:44:23 AM
Hi,

anyone can help me to have a virtuemart webhook to change order status?


Thanks in advance.
Davide
Title: Re: Virtuemart webhook to change order status
Post by: pinochico on April 22, 2020, 10:34:36 AM
Yes

we have plugin for change order status.
From external ERP Systems (like a SAP, Helios, Cezar or MS Azzure) by calling URL with some params.

After call this URL (URL ith order and params), then order change status and order who is payed by payment card change confirm payment too (second checkbox in order detail)
Title: Re: Virtuemart webhook to change order status
Post by: GJC Web Design on April 22, 2020, 10:40:10 AM
Look in most payment plugins .. there is the code ... you need to write the php to trigger the function

perhaps code a dummy payment plugin and trigger it by the standard   

index.php?option=com_virtuemart&view=vmplg&task=pluginresponsereceived&on=xx&pm=xxx

calls  function plgVmOnPaymentResponseReceived(&$html)

and code your own checks and validation

or a system plugin to do basically the same
Title: Re: Virtuemart webhook to change order status
Post by: pinochico on April 22, 2020, 10:51:26 AM
yes, the system plugin, who change order

status who wants (setup in Status Order Change Plugin)
pairing ID (order number or ID number)
write to logs
use as cron + setup token

See attachment (soory is not in english :)

Title: Re: Virtuemart webhook to change order status
Post by: m.davide82 on April 22, 2020, 15:06:00 PM
Hi,

thank you very much for the answers.

I need that when my order is shipped, the status must be changed to Shipped from en external system that mages the shippings.

It send a post for each status changer of the shipping, I need that when it's shipped, it changes the order status.

Here's the details of the webhook:
https://webhook.qapla.dev/#shipments


Thanks.
Davide
Title: Re: Virtuemart webhook to change order status
Post by: pinochico on April 22, 2020, 15:37:53 PM
yes,

we connected VM from external mobile app and this webhook we are used too.
For this we must created system plugin, similar to what I sent, only the URL will be called webhook, and the plugin will process this webhook and call the internal function to change the order status.

Nice programming work.
Title: Re: Virtuemart webhook to change order status
Post by: m.davide82 on April 22, 2020, 15:44:03 PM
Ok @Pinochico, thanks.

Can you send me a quote, please?


Thanks.
Davide
Title: Re: Virtuemart webhook to change order status
Post by: pinochico on April 22, 2020, 15:55:10 PM
yes I answer tomorrow by email
Title: Re: Virtuemart webhook to change order status
Post by: pinochico on April 22, 2020, 16:17:45 PM
I send email