CartThrob Wish List / Gift Registry Version 1.09
Overview
CartThrob Wish List stores wishlist data as channel entries and lets customers move wishlist items into CartThrob checkout.
Core behavior in current package:
- Wishlist channel/field are configurable in add-on settings.
- Wishlist line items are stored in the configured wishlist field.
- Add-to-cart flows can carry wishlist context (
wish_list_entry_id,wish_list_row_id,wish_list_unique_id). - On successful order authorization, purchased counts are written back to wishlist items.
Requirements
- ExpressionEngine 2.5+
- CartThrob 2.2+
- PHP 5.3+
Installation
- Upload
cartthrob_wish_listto/system/expressionengine/third_party/. - Install
CartThrob Wish Listfrom the Add-ons page. - Open the add-on CP and configure
wish_list_channelandwish_list_field. - Optionally run the installation workflow to install the packaged channel/template assets.
Upgrading
- Upload updated files for
cartthrob_wish_list. - Run add-on updates from the EE Add-ons page.
- Recheck settings and installation assets.
Start Here (10-Minute Setup)
- Open
Add-ons > CartThrob Wish List. - In settings, choose the wishlist channel and wishlist field.
- Build/create a wishlist entry.
- Use
{exp:cartthrob_wish_list:wish_list_form}to edit wishlist entries. - Use
{exp:cartthrob_wish_list:add_to_wish_list_form}on product pages. - Use
{exp:cartthrob_wish_list:wish_list_items}to render wishlist rows.
Common Tasks With Examples
1. Add Product to Wishlist
{exp:cartthrob_wish_list:add_to_wish_list_form entry_id="{entry_id}" wish_list_entry_id="{wishlist_entry_id}"}
<input type="submit" value="Add to Wish List" />
{/exp:cartthrob_wish_list:add_to_wish_list_form}
2. Render Wishlist Items
{exp:cartthrob_wish_list:wish_list_items entry_id="{segment_3}"}
{title} - Qty: {quantity} - Remaining: {purchased}
{/exp:cartthrob_wish_list:wish_list_items}
3. Show Wishlist Select
{exp:cartthrob_wish_list:wish_list_select name="wish_list_entry_id" add_blank="yes"}
4. Show Totals
{exp:cartthrob_wish_list:wish_list_total entry_id="{segment_3}"}
{exp:cartthrob_wish_list:wish_list_remaining_total entry_id="{segment_3}"}
Quick Links For Existing Users
- Need channel/field binding: see
Settings. - Need installer workflow: see
InstallationCP page. - Need tag parameters and variables: see
Template Tags. - Need checkout update behavior: see
Checkout Integration Behavior.
Control Panel Reference
Settings (.../index)
Form fields:
wish_list_channelwish_list_field
These settings determine where wishlist entries live and which field stores wishlist item data.
Installation (.../installation)
Behavior:
- shows installable channel/template package items
- can install selected templates
- can auto-populate
wish_list_channelandwish_list_fieldfrom installed defaults
Action endpoint:
do_installation
Template Tags
wish_list_form
Uses Channel Form entry flow for create/edit of wishlist entries.
Parameters:
entry_id(optional edit target)url_title(optional edit target)- standard Channel Form parameters
Behavior:
- validates
entry_id/url_titleagainst configured wishlist channel - injects existing item row data as hidden fields when editing
wish_list_items
Outputs wishlist items for a wishlist entry.
Parameters:
entry_id(required unlessrow_idflow is used)row_id(optional row filter)status(optional; passed through wishlist lookup)
Top-level variables:
row_idcounttotal_resultsnotequantityentry_idpurchasedpricetitleunique_idorder_item_idorder_idsubtotal
Nested pair variables:
item_optionspair with option fields includingoption_field,option_label,option_value,selected_option_value,option_price,dynamic
Conditional:
{if no_results}...{/if}
wish_list_select
Outputs a dropdown of current member wishlists.
Parameters:
status(optional)name(defaultwish_list_entry_id)selected(optional)add_blank(yes/no)id(optional)class(optional)onchange(optional)extra(optional raw attributes)
add_to_wish_list_form
Form wrapper to add product entries to a wishlist.
Parameters:
entry_id(product)quantitywish_list_entry_idwish_list_url_titleitem_options[...]
Posts to add_to_wish_list_action.
wish_list_total
Outputs total for wishlist items.
Parameters:
entry_idorurl_title(one required)
wish_list_remaining_total
Outputs total for non-purchased quantity remaining.
Parameters:
entry_idorurl_title(one required)
my_wish_lists
Outputs current member wishlist entries.
Parameters:
status(optional)variable_prefix(defaultwish_list:)order_by/orderby(optional)sort(optional)limit(optional)offset(optional)
Variables:
- entry variables under selected prefix
{prefix}first_row{prefix}last_row{prefix}count{prefix}total_resultswish_list_entry_idwish_list_id{prefix}switch="a|b|..."pattern support
has_wish_lists
Outputs 1 when the current member has at least one wishlist, otherwise 0.
Parameters:
status(optional)
Typical usage:
{if {exp:cartthrob_wish_list:has_wish_lists}}...{/if}
my_wish_lists_count
Outputs numeric count of wishlists for the current member.
Parameters:
status(optional)
Checkout Integration Behavior
Extension hooks used by the add-on:
form_builder_form_startcartthrob_add_to_cart_startcartthrob_add_to_cart_endcartthrob_pre_processcartthrob_on_authorizecartthrob_on_fail(viaremove_wish_list_entry_id)cartthrob_on_decline(viaremove_wish_list_entry_id)
High-level behavior:
- Wishlist identifiers can be injected into CartThrob add-to-cart forms.
- Row-level wishlist item options can be copied to cart requests.
- Cart items keep wishlist metadata for later order processing.
- On authorization, purchased counts and order references are written back to wishlist rows.