Is Purchased Item
{exp:cartthrob:is_purchased_item} checks whether the current logged-in member has purchased a specific product entry.
This is commonly used to flag past purchases or gate member-only content.
See also:
Parameters
entry_id
Product entry ID to check against purchase history.
entry_id="{segment_2}"
Output and Behavior
- Single-tag output returns
1when purchased, otherwise0. - In tag-pair mode,
{is_purchased_item}is available for conditionals. - Check scope is the current logged-in member (
session member_id). - If the user is not logged in, this check will not return purchased results.
- Requires CartThrob orders channel configuration.
- Uses the configured default order status (
orders_default_status, defaultopen) when checking prior orders.
Examples
Single-tag conditional
{if '{exp:cartthrob:is_purchased_item entry_id="123"}' }
You have already purchased this item!
{/if}
Tag-pair conditional
{exp:cartthrob:is_purchased_item entry_id="{segment_2}"}
{if is_purchased_item}
Download is available for this account.
{/if}
{/exp:cartthrob:is_purchased_item}