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...