Hi there,
I am building a custom price provider that runs on a site that can also have standard Live integration enabled. How do I go about testing if LI is enabled? I wanted to do what the LI subscribers do like this:
protected static bool EnabledAndActive(Settings settings) { var cacheValue = Context.Current?.Items?["DynamicwebLiveIntegrationEnabledAndActive"]; if (cacheValue != null) { return (bool)cacheValue; } var result = Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Configuration.Global.IsIntegrationActive(settings) && Dynamicweb.Ecommerce.DynamicwebLiveIntegration.Connectors.Connector.IsWebServiceConnectionAvailable(settings); if (Context.Current?.Items != null) { Context.Current.Items["DynamicwebLiveIntegrationEnabledAndActive"] = result; } return result; }
However, Global and Connector are internal so I can't use them. Is there another way I can determine if LI is enabled?
Also, price providers don't seem to honor a Rank or other sorting attribute. Is there a way to order them by priority so I can determine if my provider runs before or after the standard one?
Thanks!
Imar