News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order Notifications Status - Pending, Delete, Cancel, etc.. Emails problem

Started by lipes, August 01, 2012, 15:55:09 PM

Previous topic - Next topic

lipes

It's possible to remove the e-mails that is sent to Administrator
when we updade the Status in Orders & Shoppers > Order List .. of the Client ?

I just want that Client receive the e-mail i dont need to receive that e-mail too because i am just update Client Status and it will increse the emails in my account and i dont want that.
So it's like:
- Confirm Status: CAdmin receive the email, client too...
- Payment Status: Admin receive the email, client too...
- Product Transport Confirmation Status: Admin receive the email, client too...
- Return Product Status: Admin receive the email, client too...
- "Away to WC Bathroom" STATUS... -> this is a Joke  :)
- etc....
Receiving so many administration emails by what we do (in our administrator email account) just by update All/ or Some Client Status... will be like a massive SPAM ... :|

In VM 1 when we update the Client Order Status, the Administrator dont receive!
That was Perfect!

How to change this in VM2?
Thanks!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

ivus

Hi lipes,

I think you can remove the following lines. Be aware it may get re-written in the next update.

SITE_ROOT/components/com_virtuemart/helpers/shopfunctionsf.php @line 224 inside the function "static public function renderMail()"



$user= self::sendVmMail($view, $recipient,$noVendorMail);
if (isset($view->doVendor) && !$noVendorMail) {
self::sendVmMail($view, $view->vendorEmail, true);
}
return $user ;



change to:



$user= self::sendVmMail($view, $recipient,$noVendorMail);
return $user ;



You'll basically be remove the line that asks if it should also send to the VENDOR. Try that.

I hope this helps.

lipes

It's working Normal for now :D
I've did a copy of the file "shopfunctionsf - Copy.php" like i've did to many others files (that i am waiting yet for a stable solution in some next VM update)...

Many Thanks Mr. Ivus now it's perfect :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

ivus

@lipes,

I happy it's working for you now. Let's mark this sucker [SOLVED].

happy days.

lipes

i am almost sleeping that i've forgot to mark this as solved eheh :)
... many months to do just one website with vm2 to my dad ... argh..
it's never 100% done...
more I do.. more problems i find  -_-
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

maybe it's not 100% solved ...

I did another test... An Order but in my email (administrator) i cant see that Client Request Order...
And in the other email (Client test) i received that Pending Order ...
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

ivus

@lipes...

hmm.. go so here's what I did. Leave the shopfunctionsf.php with the edits in place.

site_root/administrator/components/com_virtuemart/model/orders.php @line 1118 comment/remove all of these line



if(!isset($vars['doVendor'])){
if(!isset($newOrderData['doVendor'])) $vars['doVendor'] = false; else $vars['doVendor'] = $newOrderData['doVendor'];
}
$virtuemart_vendor_id=1;
$vendorModel = VmModel::getModel('vendor');
$vendor = $vendorModel->getVendor($virtuemart_vendor_id);
$vars['vendor'] = $vendor;
$vendorEmail = $vendorModel->getVendorEmail($virtuemart_vendor_id);
$vars['vendorEmail'] = $vendorEmail;



then we'll reset the vendor to be NULL



/*
if(!isset($vars['doVendor'])){
if(!isset($newOrderData['doVendor'])) $vars['doVendor'] = false; else $vars['doVendor'] = $newOrderData['doVendor'];
}
$virtuemart_vendor_id=1;
$vendorModel = VmModel::getModel('vendor');
$vendor = $vendorModel->getVendor($virtuemart_vendor_id);
$vars['vendor'] = $vendor;
$vendorEmail = $vendorModel->getVendorEmail($virtuemart_vendor_id);
$vars['vendorEmail'] = $vendorEmail;
*/
$vars['vendorEmail'] = NULL;



then what used to be @line 1147



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



change to...



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



that solution seems to be working great for me..

I hope these instructions aren't to difficult to follow...  ;D

lipes

nope :-/
It's not difficult to follow ... it's was simple but i've tryed to do that and didnt work..

I am receiving the email in my email (Client email test account) ...
but in my father's email i cant see the Client Order request email ...

even in spam link.

I've also tryed to go back with the shopfunctionsf.php changes but still the same problem... just sent email to client account and not to administrator too...
maybe i've need to go back in orders.php and all the emails... because Orders are more important than the Status changes emails :-\


There is also a problem in Client's email... lol I dont know if anyone checked that.... it's like:

"Hi (STORE NAME),
(CLIENT NAME) confirms one order with the total of  Value€....."
The Store name and Client Name are exchanged by default.. lol :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

dorkus

not to hijack this old thread but we need to remove admin emails when a status changes.

we posted this but nobody replied: https://forum.virtuemart.net/index.php?topic=112068.msg376976#msg376976

any help for us? is this hack mentioned in this thread here working?


lindapowers

Away to WC Bathroom" STATUS...

Finally I found the meaning of the "confirmed by shopper"

Jesus christ how can a shopper confirm its own order

optmax

Well I don't know the meaning of an update done by the vendor being confirmed by shopper, so could could someone explain it.

I'm live with VM 2.0.18 and am desperate to turn off emails to vendor (and other users marked for receiving system emails) whenever the order staus changed by the vendor in the backend.

Does the hack mentioned previously work?

jjk

Quote from: lindapowers on February 07, 2013, 14:43:12 PM
Jesus christ how can a shopper confirm its own order

That related to EU-legislation published i.e. here: http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2011:304:0064:0088:EN:PDF
The implemetation is handled differently in EU member states. In German it's implemented by a 'Button law'. Basically it means that the shop owner has to inform the customer about the product details, all involved costs and at which point the customer has to 'confirm' his will to purchase (confirms that he want to buy the product and has to pay for it)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

optmax

Jjk thanks for the explanation
BUT...
This thread is mainly talking about emails sent to the vendor when the status of an order is changed by the vendor, that is after the order has been placed by the shopper (and therefore presumably has been confirmed by the shopper) and entered in the database.

I do not want the vendor to receive emails every time they change status of an order in the back end. Shopper yes, vendor no.

jjk

I think currently emails are always sent to both, vendor and shopper. (I don't know any 'disable' option for one of them)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations