shopp('storefront.also-bought-products')

Shows products that other customers have also purchased with along with the specified product or current product.

This tag will render a collection of products that other customers have purchased along with the specified product. It uses a sophisticated correlation algorithm to match purchased products to a specified product. By default this call will render the collection using the category.php content template file.

Options

  • product: Default is current product context. Specifies the target product to find correlating purchased products with. Accepts the following values: recent-cartitem to use the last item added to the shopping cart, or the numeric ID of the product, or a product slug. The default option of the current product context can mean the requested product (on a product page) or a previously loaded product such as through the shopp(‘storefront.product’) tag.
  • 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 content 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.php content template file.
  • 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

Upsell up to 3 also bought products last shopping cart item

<?php shopp('storefront.also-bought-products','show=3&product=recent-cartitem'); ?>

Shows up to 3 products that related based on other customer purchases with the last item added to the shopping cart. This uses the category.php content template as the layout for display of products in the collection.

Load also bought products related to a specified slug

<?php shopp('storefront.alsoboughtproducts','load=true&product=popular-product'); ?>

Loads the Also Bought smart collection products for a product specified by the slug popular-product. Once loaded, the collection can be “rendered” using the Collection Theme API tags like shopp('collection.name').

See Also

You must be logged in to post a comment.

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

Skip to toolbar