Page 1 of 1

[VQMod] Adding fields {NAME}, {SURNAME}, {EMAIL} to mail

Posted: Sat Jan 29, 2011 9:03 pm
by philbydevil
A few weeks back, I wanted to add fields to the mail function in admin (Sales->Mail). Thanks to afwollis, this was solved here: http://forum.opencart.com/viewtopic.php?f=20&t=25282, but it involved the editing of a core file (ie. admin/controller/sale/contact.php), which I have tended to do too much of!

I'd been meaning to take a look at VQMod and, after a suggestion from marc_cole, I have turned afwollis' code into an xml file for VQMod.

Here are the instructions for using the various fields in emails generated in admin:
Fields to use in your emails:

{NAME} = customer's first name
{SURNAME} = customer's last name
{EMAIL} = customer's email address
{TITLE} = subject of email (ie. the subject that you enter when composing the email)

Example:

Dear {NAME} {SURNAME},

Your registered email address is: {EMAIL}

Thanks,

Store Owner


I don't know when you would actually use the {TITLE} field, but it was in the code from the original thread discussing this mod.
I have only been able to test using fields when sending to individual/multiple customers/email addresses (as I'm working on a live store), not for bulk emails to "all customers", "all newsletter subscribers" or "customers who have ordered Products", but the original code worked for these so as long as my copying and pasting was/is correct (which it should be - see my signature), then all should be good.

Thanks again afwollis as he fixed this code to work. All I have done is turn it into a VQMod.

Re: [VQMod] Adding fields {NAME}, {SURNAME}, {EMAIL} to mail

Posted: Sat Mar 17, 2012 8:17 am
by heloug
Hello,

is it possible to get these features for the comment in the Order Info (Status Update -> Comment) Mail.

Best Regards
Sascha

Re: [VQMod] Adding fields {NAME}, {SURNAME}, {EMAIL} to mail

Posted: Sun Mar 18, 2012 8:15 am
by philbydevil
If you're using 1.5.x then this mod no longer works because ckeditor is used to compose the emails. There may be some other way to get the fields in there, but I wouldn't know where to start.

If you're using 1.4.9.3 (and probably above) then you might be able to apply the code to the comments in Order Update. Just have a look at the code that's been modified, and see if you can apply it to the order update files.

Re: [VQMod] Adding fields {NAME}, {SURNAME}, {EMAIL} to mail

Posted: Thu Mar 28, 2013 7:10 pm
by coff33
Hi, do you have a similar solution for Opencart 1.5.4?