Hello there!
I have a VM registration form by shopper fields. When somebody registers, I want to receive an e-mail (as an administrator) with a different mailbody then the registrated user.
Now I receive the same e-mail as the user (with a different subject). I don't know how can it be.
The related joomla settings (Users Configuration):
Allow user registration - YES
Send Password - NO
New User Account Activation - ADMIN
Notification Mail to Administrators - YES
I noticed, I can edit the mailbody via components\com_virtuemart\views\user\tmpl\mail_html_regvendor.php
What I need: I need two different e-mails, one to the user with greetings, and a different one to the admin or vendor.
Can you please help me?
SORRY, versions:
Joomla! 2.5.24
VirtueMart 2.6.6
Hmm it is a little weird... I think I found something.
If e-mail is sent, only the mail_html_regvendor mail working. I did not know why. I look after this, and I find this: components/com_virtuemart/views/user/view.html.php
In this file at row 443 to 449:
if (!$doVendor) {
$this->subject = JText::sprintf('COM_VIRTUEMART_NEW_SHOPPER_SUBJECT', $this->user->username, $this->vendor->vendor_store_name);
$tpl = 'mail_' . $mailFormat . '_regvendor';
} else {
$this->subject = JText::sprintf('COM_VIRTUEMART_VENDOR_NEW_SHOPPER_SUBJECT', $this->user->username, $this->vendor->vendor_store_name);
$tpl = 'mail_' . $mailFormat . '_regvendor';
}
I think this lines controls which e-mail to go, depend on the actual status of the user. In that case, no matter what, only the mail_html_regvendor.php will works, ("$tpl = 'mail_' . $mailFormat . '_regvendor';") both lines. At the original file (now I downloaded it) the first is "$tpl = 'mail_' . $mailFormat . '_reguser';" and the second is "$tpl = 'mail_' . $mailFormat . '_regvendor';"
So I am sorry, something wrong happened with my files. I don't think I write this lines, so I don't know what was the problem.
Where did you download VirtueMart?
I downloaded it from virtuemart.net . I don't know, maybe I missed something...