Jump to content
Sign in to follow this  
Nero

Deactive sending Out of stock e-mails

Recommended Posts

Hi, I need to deactivate sending Out of stock e-mails.


I'm trying various combination of the PS settings in:

Back Office >> Orders >> Statuses >>> Out of stock

When I uncheck "Send e-mail to customer when order is changed to this status" the client not received any e-mail notification. When is checked, client receive two e-mails - Out of stock and Order confirmation. How to deactivate stop sending only Out of stock emails?

Code hack is welcome ;)

Thanks

Share this post


Link to post
Share on other sites

That's odd. I would have thought going to Orders > Statuses, editing "Out of Stock" and unchecking "Send e-mail to customer when order is changed to this status" would have stopped sending out of stock emails to the customers. Of course, "Out of Stock" emails would still be sent to the shop owner. You have to go to Modules > Mail Alerts and uncheck "Receive a notification if a product is out of stock" to stop the shop owner getting out of stock emails. Which email are you trying to stop being sent: mails/en/outofstock.html or modules/mailalerts/mails/en/productoutofstock.html?

Share this post


Link to post
Share on other sites

Thanks for reply. Something went wrong with my PS SVN installation. I'll be tested on 1.2.5.

Share this post


Link to post
Share on other sites

rocky, I tested this feature on fresh installation PS 1.2.5 right now. As I said before. If the “Send e-mail to customer when order is changed to this status” option is checked, customer receive two emails. If is the option is unchecked, the customer can't receive any email. Are you sure if the option is unchecked, your customer receive only one email - Order Confirmation?

Share this post


Link to post
Share on other sites

I just tested this on my v1.2.5 installation and I can confirm the problem. I found a way to modify Prestashop so that it still sends the order confirmation email, even when you've unchecked the out of stock email box. Change line 350 of classes/PaymentModule.php to:

if (/*$orderStatus->send_email AND */Validate::isEmail($customer->email))



Hopefully, this doesn't have any other unintended consequences. You'll have to test to see that all the other emails still work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More