new RecentlyViewedItemsModel()
Model holding information about last visited items based on the current session. Currently only products are supported.
Methods
(static) getRecentlyViewedProducts(maxSize) → {dw.util.ArrayList}
Returns an array of products visited in the current session. The array is retrieved from the live click stream recorded in the session. All clicks on a page rendered from a "Product-Show", "Link-Product", or "Link-CategoryProduct" URL are interpreted as a product visit. Clicks on different variations of the same master product are merged and treated as one click.
Parameters:
Name | Type | Description |
---|---|---|
maxSize |
Number |
The maximum number of visited products to include in the returned list. |
Returns:
The list of last visited products. If no products have been visited, the returned list is empty.
- Type
- dw.util.ArrayList