Hi guys,
In the DW templates we have the option to iterate through the last viewed products using the tagname "eCom:Related.YouHaveSeenTheseProducts". We're looking for a way to reverse the output of this loop and then take 12 from those products to a different list, as shown below:
const int rpvShowMax = 12; var recentlyViewedProducts = GetLoop("eCom:Related.YouHaveSeenTheseProducts"); recentlyViewedProducts.Reverse(); recentlyViewedProducts = recentlyViewedProducts.Take(rpvShowMax).ToList();
Is there any way to not do this in Razor? Like building the logic in a ProductListExtender or a Provider? And are there any coding examples?
Cheers!
Tom