VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: 2dmaster on June 07, 2021, 17:49:50 PM

Title: Pls help with my custom payment plugin
Post by: 2dmaster on June 07, 2021, 17:49:50 PM
how to track a new event that user data is saved in the database (when a new order is created) in my payment plugin?
Table virtuemart_order_userinfos

They send trigger to default vm plugin ?
How to track it ? Whats name or function, when user order info saved and i can get its from database?
Title: Re: Pls help with my custom payment plugin
Post by: Jörgen on June 09, 2021, 09:29:09 AM
Check out the code of the current payment plugins or vmcustom plugin. You should fond the answer there.
Jörgen
Title: Re: Pls help with my custom payment plugin
Post by: pinochico on June 09, 2021, 15:39:54 PM
I think you use wrong idea which trigger you have to use.
We use RSFormPro with connect CRM Redmine and trigger is AfterSubmission, then I think in VM have to trigger some like "AftercreateOrder", not next trigger after create order.
Title: Re: Pls help with my custom payment plugin
Post by: AH on June 09, 2021, 16:57:14 PM
When an order head is updated this trigger is fired - maybe that is what you are searching for:

'plgVmUpdateOrderHead'

$returnValues = $dispatcher->trigger('plgVmUpdateOrderHead', array($cart, $order));
Title: Re: Pls help with my custom payment plugin
Post by: AH on June 10, 2021, 11:02:59 AM
You asked this

Quotehow to track a new event that user data is saved in the database

It is really impossible for me to work out what you are trying to do - unless you tell us that - it is not going to be easy to give you any useful answers