1. Home
  2. Docs
  3. Articles
  4. General
  5. Stop sending alerts with module “Mail alerts”

Stop sending alerts with module “Mail alerts”

The built-in module Mail alerts offers a great feature to notify shop owners whenever a new order placed on their web shop.

But it does not seem to be helpful with orders made via RockPOS at their POS terminals. So, how to stop sending this notification, just case of RockPOS orders? There is no obvious way, unfortunately.

In this article, we demonstrate how to achieve that on your own without PHP or Prestashop knowledge in 3 steps.

Here are the steps:

Step 1: Determine your PrestaShop version

If it’s or upper, go to step 2a.

Otherwise, move on step 2b.

Step 2: Do the trick


– Log into your FTP or cPanel

– Locate to webroot / overrides / modules / 

– Create a sub-directory called ” mailalerts“, so we have webroot / overrides / modules / mailalerts /

– Under this newly created directory, create a file mailalert.php, copy and paste this code snippet below, then save the file:


class MailAlertsOverride extends MailAlerts
     * Override: don't send notification on new order of RockPOS
     * @see Mailalerts::hookActionValidateOrder()
    public function hookActionValidateOrder($params)
        if ($params['order']->module == 'hspointofsalepro') {
        return parent::hookActionValidateOrder($params);

– Delete file webroot / cache / class_index.php


– Log into your FTP or cPanel

– Locate to webroot / modules / mailalerts / mailalerts.php

– Look up for this line of code

public function hookActionValidateOrder($params)

– Add this code snippet into the beginning of that function:

if ($params['order']->module == 'hspointofsalepro') {

– It should look like this:

Step 3: Enjoy

Was this article helpful to you? Yes No

How can we help?