Developer forum

Forum » Development » Product picker in code first item?

Product picker in code first item?

Mikael Conley
Mikael Conley
Reply

Hi.
I am using the code first approch to my current project.
Right now I need to be able to allow an editor to pick a product from ecom to show via an item.
I have not beeen able to find a way to create such a picker using code first.

Can anybody help me out here?


Replies

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Mikael,

If you take a look at http://doc.dynamicweb.com/training-certification/t3-platform-developer/t3-platform-developer/3-4-items#sideNavTitle1-2-3, I think you may find a useful example.

Best regards
Morten Snedker

 
Mikael Conley
Mikael Conley
Reply

Yes - thank you.
For future reference, the exact code that I needed is here:
        [Dynamicweb.Ecommerce.Content.Items.Annotations.Product("Product Link")]
        [Field("Product Link", typeof(Dynamicweb.Ecommerce.Content.Items.Editors.ProductEditor))]
        public string ProductLink { get; set; }

I would be nice if this method was documented in the api documentation here:
https://doc.dynamicweb.com/api/html/d6a14638-4580-a1c9-3328-09ce262762f1.htm#ID1EAABBA_tab1

 
Nicolai Pedersen
Reply

Hi Mikael

I added you code piece to the example, and it will be out there tomorrow.

Thank you for the input!

BR Nicolai

 

You must be logged in to post in the forum