Hi DW.
I'm trying to reuse Dynamicwebs product renderer but i'm getting an ArgumentOutOfRangeException.
My code looks like this:
void doStuff(){
Dynamicweb.Templatev2.Template t = new Dynamicweb.Templatev2.Template();
AppendProductTagsToTemplate( ref t, productID, variantID, languageID );
string test = t.Output();
}
private void AppendProductTagsToTemplate(ref Dynamicweb.Templatev2.Template template, string productID, string variantID, string Language) {
Dynamicweb.eCommerce.Products.Product p = new Dynamicweb.eCommerce.Products.Product( productID, variantID, Language );
Dynamicweb.eCommerce.Frontend.Renderer r = new Dynamicweb.eCommerce.Frontend.Renderer( _pageview, _datarow );
r.RenderProduct( p, true, template );
}
When i get to t.Output(); i throws my exception.What's missing?
Regards
Martin