shopp('storefront.viewed-products')

Shows products that have been recently viewed by the website visitor.

While a website visitor is browsing storefront products, Shopp will automatically collect up to the last 25 recently viewed products. A viewed product means a visit to the full product page. Loaded products via the Theme API through shopp('storefront.product') or similar product loading calls are not tracked.

Options

  • title: Specifies the title to be shown for the category layout overriding the default category title.
  • controls: Default is off. Overrides the display of “control” elements in the category.php template that would otherwise be shown. Used to highlight a selection of products in a category without all of the extra category controls.
  • show: No default value. Limits the number of products to show in the category display. Without a limit, this category will show all the products in your catalog (no matter what category they are in). Without a specified limit, a built-in hard limit of 1000 products is used to prevent the server’s resources from being totally consumed.
  • load: Default is false. Loads the category into memory, making it available for using Category Tags rather than displaying the category using the Category Tags.
  • pagination: Default is numeric. Set to alpha this option will use alphabetic pagination, otherwise it will default to numeric.
  • order: Default is bestselling. Possible settings include: bestselling, highprice, lowprice, newest, oldest, random, and title

Examples

Show up to 5 recently viewed products

<?php shopp('storefront.viewed-products','show=5'); ?>

Shows up to 5 products from the recently viewed collection using the layout from the category.php content template file.

Show a collection of bestselling recently viewed products

<?php shopp('storefront.viewed-products','order=bestselling'); ?>

Shows a paginated collection of recently viewed products in order by bestselling (most popular) using the layout in the category.php content template file.

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar