Jump to content

lot of mails sended to customer when editing order


Recommended Posts

On the forge Gregory Roussac suggested that someone on the forum will be able to help about that issue : 

http://forge.prestashop.com/browse/PSCFV-11213

 

 

When editing an order, lot of emails are send to customer to tell the order is being modified.

1) Each little action result in a separate email. If you make N modifications (adding products, deleting...) in a minute, the customer will receive N emails at the same time, result is bulk emails. that 's for the bug part

2) sending that notification should be configurable. As most of merchand will never knows about those emails. That's for the improvement part.

thanks for your work

 

 

he suggested that is a configuration problem. I don't know about any configuration options that will solve that issue.

 

can someone help ??

Edited by hiousi (see edit history)
Link to comment
Share on other sites

Thanks Bill, 

That was my 1st idea. But there's nothing in Orders  > Statuses about 'editing an order'. What I mean by editing an order is adding, deleting or changinh a product line in Admin area. 

 

 

please take a look at AdminOrdersControler.php sendChangedNotification() this method send an email to customer without any condition. It is  called every time those methods are called :

  • ajaxProcessAddProductOnOrder()
  • ajaxProcessEditProductOnOrder()
  • ajaxProcessDeleteProductLine()

 

If you delete a product line, add an other one, change quantity, your customer will receive 3 mails in the minute, all saying, "your order as changed".

 

I know no option to disable that stupid behavior, so I overrided AdminOrdersControler to avoid all those emails, and now, I'm waiting for Prestashop Team to re-open my bug report.

Link to comment
Share on other sites

orders -> order messages is empty (no row /  zero result)

 

but look at the code, there's no conditions on sending those mails.

 

what I did as a temporary workaround :

 

/override/controllers/admin/AdminOrdersController.php

class AdminOrdersController extends AdminOrdersControllerCore
{
       // stop sending an email to customer every time I edit a little thing 
       public function sendChangedNotification(Order $order = null)
       {
          return false;
       }
}
Edited by hiousi (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...