I have multiple plugins developed.
I need to trigger events from one plugin and they need to be recognized by other plugins.
I found a thread in this forum where the fellow answered his own questions, somewhat, where he built an "Event" plugin that contained his events. I am guessing the Publish methods.
I tried to formulate a similar plan, and the event fires and my publish event runs in my "Event" plugin.
However, the other plugins don't get notified that the event has been fired.
In the main plugin, I call the eventPublisher.Publish(args)
This then routes to the Nop.Services.Events.EventPublisher.Publish<T>(T eventMessage)
I make it here fine.
However, the first line of code is
var subscriptions = _subscriptionService.GetSubscriptions<T>();
The subscriptions are returning empty.
When I follow it, it calls Nop.Services.Events.SubscriptionService.GetSubscriptions<T>
This then calls EngineContext.Current.ResolveAll<IConsumer<T>>
Then Nop.Core.Infrastructure.DependencyManagement.ContainerManager.ResolveAll<T> is called.
Here the scope and key are always null and empty (even when EntityUpdated<T> is called when updating a product)
It seems like the Consumers in the secondary plugins aren't getting registered or the EngineContext can't find it.
Thanks in advance for any help.