Developer forum

Forum » Dynamicweb 10 » Recently Viewed Slider

Recently Viewed Slider

Joseph Vause
Reply

Hello,

What would be the ideal way to implement a recently viewed slider, some of the examples searching through the forum are for DW9, and cant seem to find good example for Dynamic Web 10, Doesn't seem to be any database table that tracks products that a user has seen, so not sure if a custom provider with SQL is the best way to go about it.

Ideally we would like it as a custom type

 

As we use the slider for many different purposes, which this is only one of them.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Jeseph.

The most of the above types of sliders are using a query. What you could relatively easy do, is to add a new option to that list, and in the template that inserts this, make a list of the last seen products and add that as a querystring parameter in the same way the component does that with the other types of related product lists.

On the product detail page, in one of the templates or in a notification subscriber, you could store which products the user has visited - either in a session or cookie variable.

Then when you need to find the last visited products in the rekated product slider, you just read the data from that session or cookie variable

BR Nicolai

 

You must be logged in to post in the forum