VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: razor7 on April 21, 2020, 22:27:34 PM

Title: Best trigger to send order data abroad
Post by: razor7 on April 21, 2020, 22:27:34 PM
Hi! I need to get order data, after it's confirmed, and send it to third party ERP software through FTP. Which is the best plugin type and plugin trigger to achieve this?

Thanks a lot!

Title: Re: Best trigger to send order data abroad
Post by: pinochico on April 21, 2020, 22:39:26 PM
Easy Feeder - we use for connection with Helios, Microsoft or mobile app :)

Created XML file or CSV file (or another type) with all information about order.
Title: Re: Best trigger to send order data abroad
Post by: razor7 on April 22, 2020, 21:04:15 PM
Thanks but I want to develop it myself. Can you answear the post question?

Thanks!
Title: Re: Best trigger to send order data abroad
Post by: pinochico on April 22, 2020, 22:15:19 PM
Of Course, go on.

If you developer, then very easy you can find which trigger is used for order confirm.
And you have to created system plugin.
Title: Re: Best trigger to send order data abroad
Post by: GJC Web Design on April 22, 2020, 23:45:51 PM
function plgVmConfirmedOrder ($cart, $order)
Title: Re: Best trigger to send order data abroad
Post by: pinochico on April 22, 2020, 23:50:12 PM
QuoteI need to get order data

Really do you need question which plugin trigger is for take order data == confirm order == if you have eshop with your custom created payment plugin?

It's very funny :)
Title: Re: Best trigger to send order data abroad
Post by: AH on April 23, 2020, 10:47:12 AM
pinochio

No need for that!
It was a simple question - simple answer
Title: Re: Best trigger to send order data abroad
Post by: pinochico on April 23, 2020, 12:51:14 PM
 AH:

thanks
Title: Re: Best trigger to send order data abroad
Post by: razor7 on April 24, 2020, 22:37:12 PM
Quote from: GJC Web Design on April 22, 2020, 23:45:51 PM
function plgVmConfirmedOrder ($cart, $order)

Great! thanks!

Candidates are plgVmOnUpdateOrderPayment and plgVmOnCancelPayment because order can be updated from backend.

I thought that VM managed this with another plugin type, but I see that it delegates all order status logic to the payment plugin. Is that correct?

Thanks a lot!
Title: Re: Best trigger to send order data abroad
Post by: GJC Web Design on April 24, 2020, 23:13:15 PM
as payment is the last step yes - these are the last calls to consider the order complete

there is also function plgVmOnUpdateSingleItem ($data, $order)  if order is edited and line items changed

Title: Re: Best trigger to send order data abroad
Post by: razor7 on April 25, 2020, 06:09:12 AM
Cool! thanks!