How To Add A New Notification

Hi,

I want to add some new notification messages…, For example when a new data is inserted in a database then a notification regarding that data insertion have to be displayed as a notification.

(Just like the notification of a successful user login).



Anyone please help me to create the new notifications.







Thanks & Regards,

Satya.

Hello,



You can use fn_set_notification function.



Please clarify what data do you mean?

[quote name='Alt-team' timestamp='1430224648' post='212828']

Hello,



You can use fn_set_notification function.



Please clarify what data do you mean?

[/quote]



Hi,

I added a new table in the database and in that table comm_name is one column name, And i created a textbox in the frontend.

Whenever a registered user is entered the data in that textbox, It has to insert in the table. This data insertion is going fine.



Now my requirement is, A new notification message has to be displayed whenever this insertion is successfully performed.



Regards,

Satya.

Find the PHP code where data insertion is made and add the fn_set_notification function there. It has the following arguments:


```php

  • @param string $type notification type (E - error, W - warning, N - notice, O - order error on checkout, I - information)
  • @param string $title notification title
  • @param string $message notification message
  • @param string $message_state (S - notification will be displayed unless it's closed, K - only once, I - will be closed by timer)
  • @param mixed $extra extra data to save with notification
  • @param bool $init_message $title and $message will be processed by __ function if true

    ```



    For example,



fn_set_notification('E', __('error'), __('access_denied'));

[quote name='eComLabs' timestamp='1430234832' post='212844']

Find the PHP code where data insertion is made and add the fn_set_notification function there. It has the following arguments:


```php

  • @param string $type notification type (E - error, W - warning, N - notice, O - order error on checkout, I - information)
  • @param string $title notification title
  • @param string $message notification message
  • @param string $message_state (S - notification will be displayed unless it's closed, K - only once, I - will be closed by timer)
  • @param mixed $extra extra data to save with notification
  • @param bool $init_message $title and $message will be processed by __ function if true

    ```



    For example,



fn_set_notification('E', __('error'), __('access_denied'));


[/quote]



Hi,



Thanks for the help, Working well. But where can i find the fn_set_notification() definition…



Regards,

Satya.

Hi [color=#282828][font=arial, verdana, tahoma, sans-serif]Satya,


[quote][/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]But where can i find the fn_set_notification() definition…

[/quote][/font][/color]

[quote name='satya1328' timestamp='1430288787' post='212878']

Hi,



Thanks for the help, Working well. But where can i find the fn_set_notification() definition…



Regards,

Satya.

[/quote]



[size=4][color=#262626][font=arial, sans-serif]You can find this function in the following file app/functions/fn.common.php (line 410).[/font][/color]



[color=#262626][font=arial, sans-serif]Best Regards, Alt-team.[/font][/color][/size]

[quote name='Alt-team' timestamp='1430293153' post='212886']

Hi [color=#282828][font=arial, verdana, tahoma, sans-serif]Satya,



[/font][/color]





[size=4][color=#262626][font=arial, sans-serif]You can find this function in the following file app/functions/fn.common.php (line 410).[/font][/color]



[color=#262626][font=arial, sans-serif]Best Regards, Alt-team.[/font][/color][/size]

[/quote]

Hi Alt-Team,



Thanks for the help.



Regards,

Satya.

Satya,



Always glad to help.



Best Regards, Alt-team.