Most Purchased (tag pair)
most_purchased returns purchased product entry IDs ordered by total sales.
This is a legacy reporting helper tag pair.
See also:
Parameters
sort
Sort direction for purchase totals.
Default: DESC
sort="DESC"
limit
Optional max number of entry IDs to return.
limit="10"
Variables
entry_id
Behavior and Constraints
- Loads purchased product totals from
order_management_model->get_purchased_products. - Uses
total_salesordering with selectedsortand optionallimit. - Outputs parsed rows containing
entry_id.
Examples
List top purchased entry IDs:
{exp:cartthrob:most_purchased limit="10" sort="DESC"}
{entry_id}<br>
{/exp:cartthrob:most_purchased}
Use with channel entries:
{exp:cartthrob:most_purchased limit="5" sort="DESC"}
{exp:channel:entries entry_id="{entry_id}" dynamic="no"}
<p>{title}</p>
{/exp:channel:entries}
{/exp:cartthrob:most_purchased}