Page 1 of 1

Email confirmation overriding?

PostPosted: Tue Oct 28, 2014 4:10 pm
by admin@.....pl
Hello Stan,

not an issue, just a technical question, so no rush ;)

there's "private static function sendVmMail" in /components/com_onepage/overrides/cart_override.php, what is it for? I was trying to put there some code, but as I can see function sendVmMail is being loaded from /components/com_virtuemart/helpers/shopfunctionsf.php, so no matter what I'm writting to cart_override.php it doesn't work.

I'm trying to put some attachment to email confirmation for status 'pending', this attachment would be different per each order, so I can't use "General mail attachment" option from Virtuemart 2 configuration.

Could you advise me how can I make override of function sendVmMail not making changes to vm core files? Is it even possible? System plugin? vmCustom plugin?

Best regards,
Chris

Re: Email confirmation overriding?

PostPosted: Wed Nov 12, 2014 4:34 pm
by admin
hello chris, we try to use VM core files to send the emails because some extensions like "virtuemart email manager" modify the VM's core files which then send the files.

the problem with order confirmation emails, is that opc itself does not send them, but they are send upon "order status change event" which is triggered from your 3rd party (or core) plugins.

currently, there is no other way to override the shopfunctionsf mail functions then:
- create an override (include the file before any other file includes it) - you'd need to do this on a first event of a system plugin
- OR override joomla email class (would probably work better, but you'd not have access to the VM's objects that it assigned to the email view)

if you only need to restyle the emails, you can use joomla theme overrides for this.

best regards, stan, rupostel.com