Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Custom Notifications Rate Topic   - - - - -

 
  • mohsin1631
  • Advanced Member
  • Members
  • Join Date: 18-May 22
  • 77 posts

Posted 28 June 2022 - 06:10 AM #1

hi i wan to send custom notifications to the admin how can i do that?



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3943 posts

Posted 28 June 2022 - 08:06 AM #2

Hello!

 

hi i wan to send custom notifications to the admin how can i do that?

 

Please check the following article in our documentation for the instructions:

https://docs.cs-cart...cation-template

 

I hope it will help you.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • mohsin1631
  • Advanced Member
  • Members
  • Join Date: 18-May 22
  • 77 posts

Posted 28 June 2022 - 08:52 AM #3

Hello!

 

 

Please check the following article in our documentation for the instructions:

https://docs.cs-cart...cation-template

 

I hope it will help you.

I successfully changed the template and sent the email through $mailer->send.

now i want to send internal notification i tried sending it with $notification_center->add i.e,

but its not working!


 

 

$notifications_center = Tygh::$app['notifications_center'];

$notifications_center->add([
'user_id' => $notif_data['user_id'],
'title' => __('vendor.notify_admin.custom.title', [
'[customer]' => $notif_data['customer']
]),
'message' => __('vendor.notify_admin.custom.body', [
'[customer]' => $notif_data['customer']
]),
'area' => 'A',
'section' => NotificationsCenter::SECTION_COMMUNICATION,
'tag' => NotificationsCenter::TAG_MESSAGES,
'action_url' => $notif_data['thread_url'],
'language_code' => Registry::get('settings.Appearance.backend_default_language'),

]);


 
  • mohsin1631
  • Advanced Member
  • Members
  • Join Date: 18-May 22
  • 77 posts

Posted 29 June 2022 - 04:43 AM #4

Hello!

 

 

Please check the following article in our documentation for the instructions:

https://docs.cs-cart...cation-template

 

I hope it will help you.

 

 

 

I successfully changed the template and sent the email through $mailer->send.

now i want to send internal notification i tried sending it with $notification_center->add i.e,

but its not working!

 

 

$notifications_center = Tygh::$app['notifications_center'];

$notifications_center->add([
'user_id' => $notif_data['user_id'],
'title' => __('vendor.notify_admin.custom.title', [
'[customer]' => $notif_data['customer']
]),
'message' => __('vendor.notify_admin.custom.body', [
'[customer]' => $notif_data['customer']
]),
'area' => 'A',
'section' => NotificationsCenter::SECTION_COMMUNICATION,
'tag' => NotificationsCenter::TAG_MESSAGES,
'action_url' => $notif_data['thread_url'],
'language_code' => Registry::get('settings.Appearance.backend_default_language'),

]);

 

any answer??



 
  • CS-Cart team
  • CS-Cart support team
  • Moderators
  • Join Date: 04-Apr 11
  • 3943 posts

Posted 30 June 2022 - 03:13 PM #5

any answer??

Please check my answer on the same topic here:

https://forum.cs-car...al-notification


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation