Posted on 04/03/2015 20:53:57
DW will provide different parameters to your provider depending on whether it is rendering a product list (eventArgs.Products) or product details (eventArgs.Product).
[RelatedProductList("MyRelatedProducts")]
public class MyRelatedProducts : RelatedProductListProvider
{
public override ProductCollection GetCollection(RelatedProductListProviderEventArgs eventArgs)
{
if (eventArgs.Product != null)
{
// product details
}
else if (eventArgs.Products != null)
{
// product list or order/cart
}
}
}
The related products are only fetched from your provider if the template loop exists in the current template. If thats not the case on your DW installation then it might be a bug.
Are you trying to render a list of related products for each product in a list? I haven't tried that before, so I'm not sure how to do that :)