List Manager Forum

Custom action (e.g. send email) on Add/Modify/Delete?

User dmitry.donskih 2018-01-29 15:37:55

Hello,

could anyone give me an idea how to implement custom action (in particular, send notification email) when a record is added to a list? Thank you.

Moonsoft support 2018-01-30 08:50:04

Hello,
you can check this source file:

JOOMLA/administrator/components/com_listmanager/models/main.model.php

There you will find the methods that are called when the 'history' option is enabled. This option register actions (add, update,delete) whenever the list is modified, you can use these same methods and introduce any custom action there. These are the methods being called:

_addAccessInsert
_addAccessUpdate
_addAccessDelete

The parameters are the record id and the list id. At the next method (_addAccessWrapper) you can check how to recover record data being added/updated and other user data attached you can use to build your email content.

Hope this helps, regards

User dmitry.donskih 2018-01-30 10:41:04

Looks like exactly what I need! Thanks, I'll give it a try.

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!