Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

How to stop VM 2 generated invoices from emailing.
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1
  • 2

TOPIC: How to stop VM 2 generated invoices from emailing.

How to stop VM 2 generated invoices from emailing. 12 years, 6 months ago #30872

I bought the component to use it as the only one obviously that sends out invoices to customers. I don't need them to receive them twice (one from VM2 and one from this component). I found in another thread directions on how to stop the VM invoices from emailing out to customers, but it does not work. The directions were as follows:

-----------------------------------------------------------------------------------------------------------
Hello. To disable VirtueMart order confirmation e-mails, you must edit VM code.


Us using VM2
open file administrator/components/com_virtuemart/models/orders and find line 1075 (VM 2.0.6. If using other version, line number may differ. Importat is preceding line is "$order = $orderModel->getOrder($virtuemart_order_id);")

and insert this code:
...
if ($order['details']['BT']->order_status=='P')
return true;
...

This will disable "pending order" e-mail to customer.
If you want to disable all status change e-mails, just uncheck "notify customer" when changing status or put "return true" on start of notifyCustomer function.

To disable only VirtueMart PDF Invoices, uncheck "Create and send pdf invoices" in VirtueMart -> Configuration ->Checkou
------------------------------------------------------------------------------------------------------------------------------------------------------

I disabled the PDF invoices in VM2, but the directions for disabling the VM Order confirmations are not working. Please advise me what to do. It is urgent to me.
The topic has been locked.

Re: How to stop VM 2 generated invoices from emailing. 12 years, 6 months ago #30921

  • pama
  • OFFLINE
  • Posts: 489
Hello. Can you really confirm VM order e-mail is sent to customer even with adding specified code? What version of VirtueMart are you using?

Also is possible confirmation e-mail is sent by some external VM plugin. Are you using any special VM payment/shipments plugins or other VM-related components?
ARTIO Support Team
Last Edit: 12 years, 6 months ago by pama.
The topic has been locked.

Re: How to stop VM 2 generated invoices from emailing. 12 years, 6 months ago #31036

You´re on the right Way!

Search Line 1141 // Send the email

Paste your Code after this Line.
Comment the Lines from 1144-1153 out.

It should look like this:


1141 // Send the email
1142 if ($order['details']['BT']->order_status=='P')
1143 return true;
1144 //if (shopFunctionsF::renderMail('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor'])) {
1145 // $string = 'COM_VIRTUEMART_NOTIFY_CUSTOMER_SEND_MSG';
1146 //}
1147 //else {
1148 //$string = 'COM_VIRTUEMART_NOTIFY_CUSTOMER_ERR_SEND';
1149 //}
1150
1151 //vmInfo( JText::_($string,false).' '.$order['details']['BT']->first_name.' '.$order['details']['BT']->last_name. ', '.$order['details']['BT']->email);
1152
1153 //return true;
1154 }


Hope this helps you.
The topic has been locked.

Re: How to stop VM 2 generated invoices from emailing. 12 years ago #34698

nice work. but . . .
how to change this to work email to the seller, but the buyer did not leave mail. I want to send the invoice through invoice?
The topic has been locked.

Re: How to stop VM 2 generated invoices from emailing. 12 years ago #34702

  • maju
  • OFFLINE
  • Posts: 1107
Hello,

Try to look on VirtueMart -> Configuration -> Checkout -> Default Order Status to send an invoice.

Add there 'Refunded' and VirtueMart will send emails only for order in this status. If you are sometimes using Refunded, you can create new status, what will shop will never use. Then VM Invoice should be only system sending invoices.
ARTIO Support Team
The topic has been locked.

Re: How to stop VM 2 generated invoices from emailing. 12 years ago #34703

thx. ok. if i seti it . . . . system send email only for shop administrator?
The topic has been locked.
  • Page:
  • 1
  • 2
User Login Empty