Developer forum

Forum » Development » NotificationSubscriber favouritelist beforerender/sort

NotificationSubscriber favouritelist beforerender/sort

Jan Sangill
Reply

Hi,

I am trying to trigger a notification, so I can do my own custom sorting in customercenter of the favouritelist.

At the moment I am just fetching ALL products and doing the sort in the view. However this is to slow, since it is using liveintegration.

I tried using the subscriber: Ecommerce.Notifications.Ecommerce.ProductList.BeforeRender/Sort, but it is only triggered on actual productlist and not in customercenter.

I cant seem to find any corresponding subscriber. Am I missing something or does it not exist?

//jan
 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Jan

I guess you are using the "Customer Experience Center - Favorites" - aka the new favorite list and not the old one. You cannot sort the products using that list template as it will only be able to support on the fields on the favorite list table in the database.

Instead of listing the product using the customer center feature, you can use the product catalog module instead and use a query to fetch the products for the favorite list. This way you can sort the products any way you want and you can even apply facets to the favorite list.

To do this, on the list of a users favoritelists, you can link to a product list page (instead of the favorites list page) by doing this:

/products?ListID=123

On the product list page, use a query with a macro to fetch the products on that favorite list id:

The macro will check that the user has access to that listid.

So now instead of showing products on the favorite list page, you now use the full product catalog and can use all the tools from there.

BR Nicolai

 
Jan Sangill
Reply

Hi, I am actually using the old Favorites. 
 [Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.ProductList.BeforeSort)]

This is not triggered. Not sure why - since I would assume it was. It is on a "regular" productlist


 

 

You must be logged in to post in the forum