Reputation: 3655
I'm looking for a way to disable some email notifications in PrestaShop.
As I know there is no way to do this without customizations.
And as I see it can be done by overriding MailCore
class.
Is it really bad idea? Can I disable email notifications in any other way?
Upvotes: 1
Views: 1410
Reputation: 11
Class override is not a very good option.
You should consider some other ways to achieve this.
For example, you can use actionEmailSendBefore
hook to disable an email notification.
I took this approach from one of the paid modules.
Upvotes: 1
Reputation: 2811
It mostly depends on what kind of notifications you are trying to disable:
Order status update notifications: these can be disabled easily via the Admin panel in the Order statuses list. Edit the desired status and simply uncheck the box.
Merchant 'New order' notifications: these can be disabled via the configuration page of the 'mailalert' module.
Other notifications: depending if these are related to modules or not you might be able to turn them off on a case-by-case basis.
In case the notifications you are trying to disable are still not in this list, then an Override of the Mail.php class seems the right idea.
Upvotes: 3