Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Reporting Namespace / PageViewRepository Class / GetRecentlyViewedProducts Method / GetRecentlyViewedProducts(Int32,Int32,Int32,String) Method
The user to filter views by; pass 0 for all users
Maximum number of rows to return
Starting index of first record in result set
Sort expression to apply to the result set
Version
GetRecentlyViewedProducts(Int32,Int32,Int32,String) Method
Get the recently viewed products for the given user Id
Syntax
public IList<Product> GetRecentlyViewedProducts( 
   int userId,
   int maximumRows,
   int startRowIndex,
   string sortExpression
)

Parameters

userId
The user to filter views by; pass 0 for all users
maximumRows
Maximum number of rows to return
startRowIndex
Starting index of first record in result set
sortExpression
Sort expression to apply to the result set

Return Value

A list of products recently viewed by the user.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also