Developer forum

Forum » Integration » Empty productlist and BeforeRender

Empty productlist and BeforeRender

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

If a productlist is empty, will the Ecommerce.ProductList.BeforeRender event be fired or is it only when products are rendered on the frontend?

Best regards
Kurt Moskjaer Andersen


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Kurt,
the ProductList.BeforeRender notification is fired only if the product list has any products, it is only fired at the frontend rendering.
You can try to subscribe to Ecommerce.ProductList.BeforeSort event which fires for any product collection(for empty too) which is run before the ProductList.BeforeRender notification

Regards, Dmitrij

 

Votes for this answer: 1
 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Dmitrij,

Thank you very much for your response. Just what I was looking for :)

Best regards
Kurt

 

You must be logged in to post in the forum