Also Purchased

This tag pair makes it easy to generate "customers who purchased this item, also purchased these other items" lists. This tag orders related items by the amount of times they have been purchased with the current product. Setting up the "purchased_items" channel in CartThrob is required if you plan to use this tag. If the purchased items channel hasn't been set up, this will not return any results.

Table of Contents

Parameters

entry_id

The entry_id of the product.

entry_id="43"
limit

The maximum number of results returned

limit="3"

Variables

entry_id

This variable will be replaced with the related item's ID.

{entry_id}
43

Conditionals

{if no_results}

Displays alternate content if no entries are found.

{if no_results}no entries were found{/if}

Examples

{exp:cartthrob:also_purchased entry_id="41" limit="3"}
You might also like:  {entry_id}<br /> 
{/exp:cartthrob:also_purchased}

{exp:cartthrob:also_purchased entry_id="41" limit="3"}
{embed="product/detail" entry_id="{entry_id}"}
{/exp:cartthrob:also_purchased}

{embed="product/detail" entry_id="{exp:cartthrob:also_purchased entry_id="41" limit="3"}{entry_id}|{/exp:cartthrob:also_purchased}"}