Hi,
I'm creating a search module that searches in eCom products, in a very specific way, with lots of search rules and more, but the result of my search is a "simple" ProductCollection.
Is it possible to use the Renderer class to get my result listed exactly like the product list template?
I'm looking for a way to skip around creating my own paging functionality, and since the product list has all the features i need, it would be ideal to use it as the base for my result output.
I tried this, but the output is missing a lot of tags:
Dynamicweb.eCommerce.Frontend.Renderer r = new Dynamicweb.eCommerce.Frontend.Renderer();
Dynamicweb.Templatev2.Template t = new Dynamicweb.Templatev2.Template( "TekniskSoegning/List.html" );
Dynamicweb.eCommerce.Products.ProductCollection prodList = new Dynamicweb.eCommerce.Products.ProductCollection();
prodList.Load( "SELECT TOP 10 * FROM EcomProducts" );
r.RenderProducts( prodList, t, "Results" );
return t.Output();
Has anyone done this before? Is it possible?
Regards
Martin