Developer forum

Forum » Templates » YouHaveSeenTheseProducts loop in ViewModel

YouHaveSeenTheseProducts loop in ViewModel

John Broers
Reply

Hi,

I'm converting some old templates to ViewModel templates and I was wondering if it's possible to use the 'YouHaveSeenTheseProducts' products loop in a ViewModel based template. Is this still available somewhere?

GetLoop("eCom:Related.YouHaveSeenTheseProducts")

 

BR,

John


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi John

That is not possible as that particular feature has been left out in the new product catalog due to almost no use. 

You can call Dynamicweb.Ecommerce.Specialized.RelatedProductListProviders.YouHaveSeenTheseProductsList.GetCollection(new RelatedProductListProviderEventArgs())

from your template to get a list of products - the above returns a product collection and not a ProductListViewmodel.

Create an instance of the YouHaveSeenTheseProductsList first.

Votes for this answer: 1

 

You must be logged in to post in the forum