I want to stop VM sending out the registration mail to new users.
Registration mail to shop owner is ok
But do not want new users to receive this.
How do I go about this, can't see an option for it in VM (3.4.2)
Thanks for replying
Hi Jack,
it is hardcoded in the administrator\components\com_virtuemart\models\user.php -> private function sendRegistrationEmail($user,$password, $useractivation);
you could adapt it there - a switch in admin could be nice though
Thanks John, I should be able to find that ;-)
I agree... shop owners should have control over what is, and isn't, send to their customers.
A switch would be nice.
Guys, my expertise in php is very weak, may be you can post here code snippet for canceling sending registration information to shopper?
This will be very helpful for me and others.
(Yes, i understand, changes will be lost after update ...)
Haven't tested but probably just comment out the function call
administrator\components\com_virtuemart\models\user.php ~ line 383
end of the register function
// $this->sendRegistrationEmail($user,$pw, $useractivation);
(J! 3.9.18; VM 3.6.10)
// $this->sendRegistrationEmail($user,$pw, $useractivation);
should be, but not working ... Shopper still receive registration emails ... any other ideas?
I commented out all block (lines 287-398) - the same.
Using overrides in your template?
May also search for the function Call in all your Joomla files.
Jörgen @ Kreativ Fotografi
As i see, generally the solution mentioned there before - works.
As I see, my problem is located in plg_VPOnePageCheckout_VM3-6.8.zip.
When VPOPC is disabled, shopper do not receive registration email.
But, as i see, vpopc is written in JS, i have no idea how to deal with this.
Then you can try another forum, especially for VPOnePageCheckout
VP support forum is https://www.virtueplanet.com/forum/
The correct solution is (thank you to Jumbo from VP forum):
components/com_virtuemart/helpers/shopfunctionsf.php
static public function renderMail ($viewName, $recipient, $vars = array(), $controllerName = NULL, $noVendorMail = FALSE,$useDefault=true)
replace
$user = self::sendVmMail( $view, $recipient, $noVendorMail );
with
// Do not send registration mails to users
if($viewName != 'user') {
$user = self::sendVmMail( $view, $recipient, $noVendorMail );
}
I don't understand why when I buy on the e-shop, I don't get my account information so that I can't log in next time (I don't know my username and password).
Is this a requirement?
Remember that this hack will disappear the next time you upgrade VirtueMart.