We have a Sitecore template on to which we want to put a Multilist field that allows a content editor to pick the top N products from uCommerce to relating to a page using this template. I have looked into using a Custom Data Template Field Source (http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/09/Sitecore-7-Custom-Classes-as-Data-Template-Field-Sources.aspx) and using the uCommerce APIs I can match the page name (which is the Category) to the Category in uCommerce.
I can then bring back the Products for the editor to pick from, however the last part I can't seem to do is convert these into Sitecore Items as that is the return type needed for the data source.
I guess there are 2 questions:
- Is there a better (less flaky) way to get the products for the multilist based on category (dynamically)
- How do you convert the uCommerce Product entities to Sitecore Items?