Start a new topic

Selecting which notifications to use


Is there a way to control which notifications the site sends?

For example I do not want to send the "Order paid notification".

1 Comment

At the current moment we do not have special UI or settings to manage which notification available or not within selected store.

We received your feature request and implement in next platform releases You may track feature implementation progress  in this issue

I would suggest two workarounds how to implement notifications filtration depending of store:

First is global notification manager override.

Add special settings to store





 //Add order numbers formats settings  to store module allows to use individual number formats in each store
            var settingManager = _container.Resolve<ISettingsManager>();
            var settings = settingManager.GetModuleSettings("Your-module-id").Where(x=> x.Name.EndsWith("Stores.EnabledNotifications")).ToArray();
            settingManager.RegisterModuleSettings("VirtoCommerce.Store", settings);

  And then need to write your implementation of INotificationManager interface which should encapsulate or derived from original implementation, where need  in next methods : ScheduleSendNotification and SendNotification implement logic for checking your new store setting Stores.EnabledNotifications.

Second  is override OrderNotificationObserver with your custom type, where implement logic of depending of store notification filtration and replace it in unity container.


 _container.RegisterType<IObserver<OrderChangeEvent>, YourCustomOrderNotificationObserver>("OrderNotificationObserver");


Login or Signup to post a comment