News:

Looking for documentation? Take a look on our wiki

Main Menu

Disable order update emails

Started by hanneswebseo, February 28, 2014, 14:22:37 PM

Previous topic - Next topic

hanneswebseo

Hey Forum People.

I have a bit of a weird question. One of my clients does not want their clients to receive notification emails when they update the order status in the backend. I use Artio VM invoice for the order management. The do not notify boxes are ticked, yet the client still gets the order update email.

Virtuemart version :  2.0.20b
Joomla Version :  2.5.11
Artio VM Invoice version : 2.0.28

Thanks

jenkinhill

You are using insecure Joomla/VM versions - http://forum.virtuemart.net/index.php?topic=118683.0

In current VM versions you can specify at which order status emails should be sent,  as set in Configuration/Checkout
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

ArtRight

Here are instructions from artio's page:  http://www.artio.net/faqs/vm-invoice/how-to-disable-virtuemart-order-e-mails-and-invoices

HOWEVER!!  Be sure that on this line (if ($viewName=='invoice' AND in_array($vars['orderDetails']['details']['BT']->order_status, array('P','U')))), you enter EVERY status code.  For example, "array('P','U','C','R','S')". 

If using VirtueMart 2.x.x older than 2.0.22 (EDIT: New, better working integration):
1.open file JOOMLA_ROOT/components/com_virtuemart/helpers/shopfunctionsf.php

Find line 243 (can differ depends on your version of VM)
Important is, replace line
$user= self::sendVmMail($view, $recipient,$noVendorMail);
with
//edied: ARTIO: disable initial e-mail to customer. send only to vendor.
if ($viewName=='invoice' AND in_array($vars['orderDetails']['details']['BT']->order_status, array('P','U')))
$user = null;
else
$user= self::sendVmMail($view, $recipient,$noVendorMail);


2.Open file JOOMLA_ROOT /administrator/components/com_virtuemart/models/orders.php
Find line 1290  (can differ depends on your version of VM)

And replace

// Send the email
if (shopFunctionsF::renderMail('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor'])) {
...

with

// Send the email
$res = shopFunctionsF::renderMail('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor']);
if ($res===null) //edited: ARTIO: when sent to customer disabled, dont display message.
return true;

if ($res) {
...

This option will disable initial "pending order" E-mail. However, customer will get e-mails if you keep checked "notify customer" option when changing order status. If you want to disable e-mails also for other statuses, don't check ,,notify customer" or edit condition in point 1 like: 


... array('P','U' /* other statuses: */, 'P','S') ...