VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Balazs on September 30, 2014, 10:37:21 AM

Title: Duplicated order confirmation mail to vendor and buyer
Post by: Balazs on September 30, 2014, 10:37:21 AM
Joomla 2.5.8 and Virtuemart 2.6.10 (VM recently updated from 2.0.14)

The confirmation email is set to be sent right after the order (for vendor and customer). My problem is that the email is sent twice both to vendor and both to customer.

The order takes about 10 seconds and the duplicated email arrives with 4 seconds difference.

What can be the reason? Do you have any idea where to modify the code to avoid duplication?
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: John2400 on September 30, 2014, 11:12:35 AM
http://forum.virtuemart.net/index.php?topic=123644.0


This has been a topic in the forum. Just might use search first if you have an issue.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Balazs on September 30, 2014, 12:56:38 PM
True, sorry! I have figured out that my problem is similar to adriespo's problem in the topic you mentioned:
http://forum.virtuemart.net/index.php?topic=123644.105 (http://forum.virtuemart.net/index.php?topic=123644.105)
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: John2400 on September 30, 2014, 13:53:12 PM
Great mark your post solved.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 04, 2014, 00:23:37 AM
I have some problem.
Virtuemart 2.6.10, joomla! 2.5.27

After user confirm order he and admin get twice e-mail. Status for order panding ( P ).

I found that in \components\com_virtuemart\helpers\cart.php :

function confirmedOrder() {
...
$orderModel->notifyCustomer($this->virtuemart_order_id, $orderDetails);


$orderModel->notifyCustomer($this->virtuemart_order_id, $orderDetails); not exist in early version

I comment that string.... I think it's bug: send some e-mails on create order and after send other in payment plugins ( after change status order )


Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Milbo on October 10, 2014, 00:44:43 AM
Do you have the right settings in the vm config? We dont send any email at pending. I should remove the option, lol. When I remove the option that you can select "Pending", it will make it easier for 40% of the users, but I know there is at least 1% screaming. Hmm
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 10, 2014, 01:55:32 AM
And so???  Why on create(confirmed by shopper) order you send e-mail, and at same time in order change order status and send again?
One place for send e-mail - then change order status.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Milbo on October 10, 2014, 02:25:48 AM
Because you set it in the config that way?
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 10, 2014, 09:07:27 AM
I don't get payment online in my stroe. Therefore i need to notice manager about create order. At the same time, i need to send email to shopper, that we get from him order. Because it's the correct form of behavior: notice/inform shopper about order status.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Dragoner on October 13, 2014, 16:05:16 PM
Thanks ! It works .. ;)
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Milbo on October 14, 2014, 21:18:19 PM
Yeh but not Pending.
I just made a poll within our internal group, 18 people. So long we decided to remove possibility to set the order status pending for shoppers. Only vendors may be interested.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 14, 2014, 21:31:20 PM
I don't understand you.
What's about status of order, after shopper confirm order and if store has not online payment?
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: dorkus on October 21, 2014, 20:31:52 PM
we run vm 2.6.10 and joomla 2.5.27 and also receive one order in the system but two admin mails for pending payments. customer receives two confirmation mails as well. very confusing.... i am not sure how to fix this?? please advise!
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 21, 2014, 20:54:17 PM
Quote from: dorkus on October 21, 2014, 20:31:52 PM
we run vm 2.6.10 and joomla 2.5.27 and also receive one order in the system but two admin mails for pending payments. customer receives two confirmation mails as well. very confusing.... i am not sure how to fix this?? please advise!
Look at http://forum.virtuemart.net/index.php?topic=125997.msg431927#msg431927
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: dorkus on October 21, 2014, 21:03:38 PM
so you mean comment out the following line?

$orderModel->notifyCustomer($this->virtuemart_order_id, $orderDetails);
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 21, 2014, 21:16:58 PM
Quote from: dorkus on October 21, 2014, 21:03:38 PM
so you mean comment out the following line?

$orderModel->notifyCustomer($this->virtuemart_order_id, $orderDetails);
Yes.
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: dorkus on October 23, 2014, 09:50:03 AM
so now no pending order mails are sent - we want customers to receive an order confirmation - no matter if its paid or not?!?! what do we do now?
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: worknmn on October 23, 2014, 10:53:43 AM
You should check configuration in "Checkout".
"Default Order Status to send email to shopper" and "Default Order Status to send email to vendor " should have "Panding"
Title: Re: Duplicated order confirmation mail to vendor and buyer
Post by: Robert_ITMan on April 30, 2016, 16:06:29 PM
Thanks worknmn - your fix works for me too on VM2.6.18. I had same problem with unwanted extra pending order being sent to both shopper and admin.