VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: TanaTik on September 18, 2014, 14:53:20 PM

Title: BUGs, Sent two e-mail vendor and shopper.
Post by: TanaTik on September 18, 2014, 14:53:20 PM
Help me please.
Go to VirtueMart ->  settings -> Checkout(ordering)  - > Order Status default settings for sending e-mail. letters to the buyer and Order Status default to send e-mail seller.
if I set the option COM_VIRTUEMART_ORDER_STATUS_PENDING - > send two e-mails buyers and seller.
if I set the option  VIRTUEMART_ORDER_STATUS_CONFIRMED_BY_SHOPPER do nothing (not sent e-mails)
if I set the option   COM_VIRTUEMART_ORDER_STATUS_CONFIRMED and then confirmed. Work good send 1 e-mail buyer and seller.

I need when i stay option COM_VIRTUEMART_ORDER_STATUS_PENDING, send 1 –email buyer and 1 seller. (NOT TWO).
Version VirtueMart 2.6.10, Joomla! 2.5.24 

Thanks for the help.
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: jjk on September 18, 2014, 20:36:47 PM
In Virtuemart Configuration - check if you have entered 'Pending' in Configuration > Checkout tab:
1. Default Order Status to send email to shopper
2. Default Order Status to send email to vendor

If yes, delete 'Pending' in those fields.
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: TanaTik on September 19, 2014, 10:22:03 AM
thanks for the answer, but the answer does not fit, because I need to be when there is a status of "pending" send 1 letter buyer and seller, and I have sent two emails of buyers and sellers. (if delete status pending and add other do nothing, described above)
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: jjk on September 19, 2014, 22:06:23 PM
Pending Order status is used for orders which got created, but are not confirmed by the shopper, so why do you want to send emails for an order that has not yet been placed?
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: TanaTik on September 20, 2014, 14:33:51 PM
Because, I stay other status (if I set the option  VIRTUEMART_ORDER_STATUS_CONFIRMED_BY_SHOPPER do nothing (not sent e-mails),   
Need when user created order, send email admin and and I do not care which status be.
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: JasonDeeFL on November 21, 2014, 01:17:13 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: BUGs, Sent two e-mail vendor and shopper.
Post by: TanaTik on November 21, 2014, 01:32:28 AM
tested this fix, not work :( don't send any mails. Thanks for the answer
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: JasonDeeFL on November 21, 2014, 03:52:15 AM
I had the exact problem you did and this fix worked... make sure your email status setup looks like this, you'll want Pending in the list: 

(http://i.imgur.com/wXF6Uol.jpg)
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: Milbo on November 23, 2014, 13:16:54 PM
Quote from: TanaTik on September 20, 2014, 14:33:51 PM
Because, I stay other status (if I set the option  VIRTUEMART_ORDER_STATUS_CONFIRMED_BY_SHOPPER do nothing (not sent e-mails),   
Need when user created order, send email admin and and I do not care which status be.

Then the right solution is to find the reason, why there is not email sent for "confirmed by shopper".

Quote
I do not care which status be.
Useless attitude it has the quality of, I wanna fly, I dont care for reality
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: JasonDeeFL on November 23, 2014, 15:23:28 PM
The guy doesn't speak very good English obviously, he meant he'll use whatever settings as long as they send the emails.
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: Milbo on November 23, 2014, 22:02:49 PM
If I take a look on your settings, it is just Confirmed by shopper instead of pending
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: slammy on November 24, 2014, 09:52:48 AM
Hi Tanatik,

form my point of view, don´t use ORDER STATUS CODE "P" in your config for normal usage of orderstatus, what means do not include "pending" into your orderstatus-email and payment-configuration (only for cancelled payments e.g PayPal) . This state is reserved for orders which are in different ways (e.g payment) not finished or cancelled by user while processing the order. Take a look at this thread last post, maybe it helps: http://forum.virtuemart.net/index.php?topic=125572.0
regards jens 
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: K3N0Bi1 on December 04, 2014, 11:18:07 AM
Hi,

Same problem here. None of the above suggestions works for me. I just keep getting 2 emails when "Pending" is enabled in "Default Order Status to send email to vendor".
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: K3N0Bi1 on January 30, 2015, 11:46:19 AM
I finally found a way to stop getting two e-mails, both as a vendor and shopper. The issue appeared to be created because of Standard payment method.
To fix this, click on Order Statuses in Configuration and there you create a new order status (ex. Pending2).
Next, click on Payment Methods in Shop and access each Payment Method set to Standard. In the Configuration tab, there is an 'Order Status for Pending transactions' field. Change it to the order status you just created (ex. Pending2).
Title: Re: BUGs, Sent two e-mail vendor and shopper.
Post by: Milbo on February 01, 2015, 12:04:24 PM
Quote from: K3N0Bi1 on December 04, 2014, 11:18:07 AM
Hi,

Same problem here. None of the above suggestions works for me. I just keep getting 2 emails when "Pending" is enabled in "Default Order Status to send email to vendor".

Yes, which is intended.