VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Joomloo1 on April 27, 2014, 12:34:00 PM

Title: Plugin event trigger on order_done.php
Post by: Joomloo1 on April 27, 2014, 12:34:00 PM
Hi everyone,

I m trying to create a plugin in which the event will trigger when the payment is done! I have this code now on order_done.php which is working great for my website but i would like to convert it to a plugin.
Thing is, i tried those event triggers plgVmOnConfirmedOrderStorePaymentData() and plgVmConfirmedOrder() and for some reason they dont trigger :S

*The Class of the plugin extends vmPSPlugin

I dont want to create a payment plugin just a plugin that will trigger after payment action! I noticed when i create the plugin its automatically added as an option in Payment Options in Virtuemart Control panel. Perhaps i must use another class and another event trigger?

Thanks in advance!
Title: Re: Plugin event trigger on order_done.php
Post by: GJC Web Design on April 27, 2014, 21:15:47 PM
just make it a system plugin..

class plgSystemPayment_done extends JPlugin {

and use a function

function plgVmConfirmedOrder(VirtueMartCart $cart, $order) {

//do your stuff

}

}