VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandomatyas on December 01, 2022, 17:04:25 PM

Title: Modify order confirm mail via plugin
Post by: sandomatyas on December 01, 2022, 17:04:25 PM
Is there a way to modify the order confirm emails after it was builded but before sent?

I use RSForm Pro component which has a cool function for that: "Script called before the Admin Email is sent. The $adminEmail array contains all the information that will be sent in the email", here I can modify all of the email params like to, cc, bcc, subject, body, sender, replyto, attached files, etc

The main idea would be modify the subject, maybe the recipient based on custom php script, like add some data to the mail subject if a specific cookie exists or has a specific value. Or add extra recipients on weekends.
I know there is VP Email manager (https://www.virtueplanet.com/extensions/vp-email-manager) and I'm also familiar with layout overrides.

Long story short: is it possible to manage the vendor email's subject/recipient by a triggered plugin method?

side note: is there a list of all of Virtuemart's plugin triggers?
Title: Re: Modify order confirm mail via plugin
Post by: sandomatyas on December 01, 2022, 17:16:52 PM
I found plgVmOnSendVmEmail, cool :)
Title: Re: Modify order confirm mail via plugin
Post by: pinochico on December 02, 2022, 11:21:17 AM
Virtuemart Mailing manager - older app - from VM1.19 to VM3
Title: Re: Modify order confirm mail via plugin
Post by: Milbo on December 02, 2022, 21:09:45 PM
Quote from: sandomatyas on December 01, 2022, 17:04:25 PM
side note: is there a list of all of Virtuemart's plugin triggers?

Use an IDE and search for "plgVm", then you should find em all