How Do You Send A Notification Message To The Vendor Panel?

Hi, so I'm trying to implement a cancel order function on the storefront and I've been successful so far, but the last part of my implementation is to send a message in the notification center of the vendor whose selling the order that got cancelled.

I can see from the event notifications documentation that I have to use Tygh::$app['notifications_center'] similar to how when you send emails you use Tygh::$app['mailer'], but I'm unsure on what to put in some of the parameters needed to use that. Is there an example somewhere that I can follow? Thanks

To clarify, I want something like what happens when a vendor products is disapproved and a notification in their vendor panel appears that informs them of that.

Up, does no one really know how this works?

Go to Administration/Notifications/Vendor notifications

The order statuses (by name) will be listed on the left.

You can enable/disable from that page or click the status to get to the content of the notification.

If you use the older email templates (better IMHO), then they will be enabled/disabled as above, but the content is in Adminstration/Statuses/Order statuses.

Hi, thanks for replying. I am using the old email system, but the options in Adminstration/Statuses/Order statuses are for emails aren't they? I want something that sends a message to the notification center:

Like the notifications that are used in Vendor data premoderation, when a product is approved or disapproved. Is there a code that has an example that shows me how to do that?

I've not yet worked with the new notifications center so can't be specific. Sorry.

But you might want to read: