Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MailAlerts Module Mod for BackOffice

Featured Replies

Not sure where to post this, but if anyone needs to see the product reference (aka Stock Code) of products for product notifications (MailAlerts) in the back office, this is what I did to add the column to the display:

Find in /modules/mailalerts/mailalerts.php beginning around line 479 within the renderList() function:

        } else {
            $listFields = [
                'id_product' => [
                    'title' => $this->l('Product ID'),
                    'type' => 'text',
                ],

and right after that insert the following code:

                'reference' => [
                    'title' => $this->l('Stock Code'),
                    'type' => 'text',
                    'callback_object' => $this,
                    'callback' => 'renderProduct'
                ],

Then within the function getProductsSubscribers() - around line 588 find the following code:

            ->leftJoin('product_lang', 'pl', 'pl.id_lang = '.$langId.' AND pl.id_product = oos.id_product AND pl.id_shop = oos.id_shop')

and right after that insert the following code:

            ->leftJoin('product', 'p', 'p.id_product = oos.id_product')

Save, Upload, Clear Cache, Voila!

I would think this could be created in an override, because updated the module will likely overwrite this file, but I'm still kinda green at extending module classes.

Hope someone finds this useful.

  • Author
7 hours ago, datakick said:

Nice one, this should be part of the module.

You can create pull request here, and we'll merge it: https://github.com/thirtybees/mailalerts

 

Pull Request and commit (I think) have been made...

On a related note:
The above code is missing something.

In the function getProductsSubscribers() - around line 583 find the following code:

            ->select('oos.id_product')

and just below it - insert this line:

            ->select('p.reference')

That should take care of my omission above.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.