Developer forum

Forum » Development » Best way to extend the settings of liveintegration?

Best way to extend the settings of liveintegration?

Anders Ebdrup
Reply

Hello guys,

 

I am looking for the best way to extend this class: LiveIntegrationAddIn in order to add some extra settings, that we can use in the various notification subscribers in DynamicwebLiveIntegration?
Let's e.g. say that we need to do some specific handling when an order has a special currency, and that special currency I would like to handle as a custom setting on the LiveIntegrationAddIn screen in the administration so the user can define it.

Looking forward to hear from you!

Best regards, Anders


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

The LiveIntegrationAddIn  in Dynamicweb.Ecommerce.DynamicwebLiveIntegration namespace is not sealed. So you can inherit it and ad your own settings and properties.

 
Anders Ebdrup
Reply

Hi Nicolai,

 

I have actually tried that approach with this implementation:

using Dynamicweb.Ecommerce.DynamicwebLiveIntegration;
using Dynamicweb.Extensibility.AddIns;
using Dynamicweb.Extensibility.Editors;

namespace Custom.LiveIntegration
{
    [AddInName("Custom Live Integration")]
    [AddInLabel("Custom Live Integration")]
    public class CustomLiveIntegrationAddIn : LiveIntegrationAddIn
    {
        [AddInParameter("Ekstra Setting 1")]
        [AddInParameterEditor(typeof(TextParameterEditor), "")]
        [AddInParameterGroup("General")] 
        public string ExtraSetting1 { get; set; }

    }
}

The new field is shown when I change the provider in the administration, but when I open the setup screen again, the provider is switched back to the default: "ERP Live Integration" and not my Custom implementation.

Am I missing something here?

 

Best regards, Anders

 

 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Well, we will look into it!

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Anders,
could you try this appoach and inherit from the BaseLiveIntegration add-in instead?
The code is in this post.
It is explaining custom Live integration for DW9 but the same stuff can be made for DW10 too.
BR, Dmitrij

 
Anders Ebdrup
Reply

Hi Dmitrij,

 

Does it mean that I cannot inherit from the standard LiveIntegrationAddIn? And that I will have to totally make my own version?

But then I am not extending, but just seems to create a new monster :-)

 

Best regards, Andes

 
Anders Ebdrup
Reply

Hello again,

 

Any other thoughts for extending the settings section? 

 

You must be logged in to post in the forum