News:

Looking for documentation? Take a look on our wiki

Main Menu

Pending orders dont send email

Started by memonic, November 05, 2014, 20:18:51 PM

Previous topic - Next topic

memonic

Hi people!

I have a problem, when the orders was PENDING, Virtuemart dont send me an e-mail.

I add pending in the configuration in "Default Order Status to send email to shopper"  and "Default Order Status to send email to vendor" but dont send any e-mail.



Anybody knows what is wrong?

thank you so much for your support

[attachment cleanup by admin]

ReJigged

Hi,

I am having the same problem. Did you find a solution to this?

System is sending mail when order is 'Confirmed'. But I need to see 'Pending' orders from those customers who might be having a payment problem.

Thanks

RJ

Milbo

The problem before was, that the email was sent twice. So we removed sending emails for orderstatus Pending.
Orderstatus Pending means that the customer put something on the cashdesk, but did not pay or confirm the order.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ReJigged

Quote from: Milbo on March 07, 2015, 09:33:23 AM
Orderstatus Pending means that the customer put something on the cashdesk, but did not pay or confirm the order.
Hi,

I'm not sure that's right? Order status is set to 'Pending' once the order is confirmed. Customer can still bail out at the payment processor page (PayPal, WorldPay etc..) and this is where we need to contact customers who cannot complete this step at the payment processor. Order status remains at 'Pending' but customer has not paid due to various reasons.

So I need the system to send an email just before customer is redirected to payment processor.

Thanks
RJ

Milbo

Maybe it is used elsewhere that way, but since vm2, it is meant for an order which is just created, but not executeable. Quite similar to a pending order in the stock market, which is not executed before certain conditions meet, same here. A pending order becomes a real order, if the shopper agreed and the vendor accepted. This is a basic juristic thing how trades are done.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ReJigged

Hi,

OK - I can see what you're saying. But vendor needs to be aware of pending orders at moment order is sent to payment processor.

I might be misunderstanding something but why this option in Configuration -> Checkout if this is not possible? See image. You can see 'Pending' is an status that should generate email to vendor.

Thanks

RJ


Milbo

As Alatak wrote in the other thread. The payment method also decides if an email is sent. So please check your payment configuration
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Georgios Kolomvos

#7
I totally agree with ReJigged. Vendor should be able to choose if he wants to get a message whenever an order is placed, even if the order was not paid.
I had that problem with the Paypal payment method (Standard Paypal) but it was solved thanks to the following little hack (it worked on Joomla! 3.10.11, Virtuemart 4.0.6):
Open the file plugins/vmpayment/paypal/paypal.php and find the following code (at line 490):

if ($this->_currentMethod->paypalproduct == 'std') {
$html = $paypalInterface->ManageCheckout();
// 2 = don't delete the cart, don't send email and don't redirect
$cart->_confirmDone = FALSE;
$cart->_dataValidated = FALSE;
$cart->setCartIntoSession();
vRequest::setVar('html', $html);

} else {

You just have to insert the following 2 lines of code after the command vRequest and before else (where the blank line is):

$modelOrder = VmModel::getModel ('orders');
$modelOrder->updateStatusForOneOrder ($order['details']['BT']->virtuemart_order_id, $order, TRUE);

So the final code will be:

if ($this->_currentMethod->paypalproduct == 'std') {
$html = $paypalInterface->ManageCheckout();
// 2 = don't delete the cart, don't send email and don't redirect
$cart->_confirmDone = FALSE;
$cart->_dataValidated = FALSE;
$cart->setCartIntoSession();
vRequest::setVar('html', $html);
// my new code BEGIN
$modelOrder = VmModel::getModel ('orders');
$modelOrder->updateStatusForOneOrder ($order['details']['BT']->virtuemart_order_id, $order, TRUE);
// my new code END
} else {

Do not forget to add Pending at the VM Shop Configuration / Orders / Default Order Status to send email to vendor.
Of course, in case of a Virtuemart Update that affects the file paypal.php, these two lines of code must be applied again...



Georgios Kolomvos
Patras, Greece