VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: JasonDeeFL on November 12, 2014, 01:44:00 AM

Title: [SOLVED] VM sending 2 success mails after upgrade to 2.6.12.2
Post by: JasonDeeFL on November 12, 2014, 01:44:00 AM
Hey Guys,

Just upgraded to VirtueMart 2.6.12.2 and when an order is submitted the user receives 2 identical emails instead of 1.

Any ideas? Joomla version is 2.5.27

Thanks
Title: Re: VM sending 2 success mails after upgrade to 2.6.12.2
Post by: JasonDeeFL on November 20, 2014, 18:08:25 PM
bump?
Title: Re: VM sending 2 success mails after upgrade to 2.6.12.2
Post by: jenkinhill on November 20, 2014, 23:34:58 PM
So you searched the forum and tried the suggestions for this issue that you found? Did none of them work?

Like http://forum.virtuemart.net/index.php?topic=125572
http://forum.virtuemart.net/index.php?topic=124903
http://forum.virtuemart.net/index.php?topic=125785
Title: Re: VM sending 2 success mails after upgrade to 2.6.12.2
Post by: JasonDeeFL on November 21, 2014, 01:13:39 AM
Apparently you have to make a core hack to fix this problem , which will be overwritten when updating virtuemart,  adding the following code in \administrator\components\com_virtuemart\models\orders.php removed the double emails:

Old code:
// Send the email

$res = shopFunctionsF::renderMail('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor'],$this->useDefaultEmailOrderStatus);



New code:
// Send the email

if(empty($shipment_name) || empty($payment_name)){
return false;
}

$res = shopFunctionsF::renderMail('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor'],$this->useDefaultEmailOrderStatus);


Found a forum link on one of the posts you pointed out, but the third one you cited is the same problem unanswered,  I went ahead and replied to the guy...
Title: Re: [SOLVED] VM sending 2 success mails after upgrade to 2.6.12.2
Post by: lorartemis on November 21, 2014, 09:10:56 AM
I'm using Virtuemart 2.6.12 and Joomla 2.5.27 and have the same issue.   I have to receive pending emails as the client wants to use the Offline Card Processing plugin bought from the VM plugin site.   This means the client only gets the last four digits of the card if they receiving the pending order email.   If they only receive the Confirmed order email, they lost the last four card digits.   I know the Mods think pending is useless, but why have a plugin which replies on it if it's no good?   

I opened a ticket with them to ask the same question and was fobbed off with the answer that settings where in VM configuration which was no help at all.    I'm so frustrated with this now that I could cheerfully just walk away from my company and just not work at all.

Does anyone know if this fix keeps the pending email for the vendor?
Title: Re: [SOLVED] VM sending 2 success mails after upgrade to 2.6.12.2
Post by: JasonDeeFL on November 21, 2014, 12:04:03 PM
This fix uses the Pending status in the back-end,  it will send the first 12 digits of the CC number using the offline CC processor by Alatek.
Title: Re: [SOLVED] VM sending 2 success mails after upgrade to 2.6.12.2
Post by: alatak on November 26, 2014, 15:49:58 PM
Hello

We have a tutorial here: http://extensions.virtuemart.net/all-tutorials/20-payments/27-offline-credit-card-processing
It should help you to configure the plugin.