CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

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

  1. Upload cartthrob_wish_list to /system/expressionengine/third_party/.
  2. Install CartThrob Wish List from the Add-ons page.
  3. Open the add-on CP and configure wish_list_channel and wish_list_field.
  4. Optionally run the installation workflow to install the packaged channel/template assets.

Upgrading

  1. Upload updated files for cartthrob_wish_list.
  2. Run add-on updates from the EE Add-ons page.
  3. Recheck settings and installation assets.

Start Here (10-Minute Setup)

  1. Open Add-ons > CartThrob Wish List.
  2. In settings, choose the wishlist channel and wishlist field.
  3. Build/create a wishlist entry.
  4. Use {exp:cartthrob_wish_list:wish_list_form} to edit wishlist entries.
  5. Use {exp:cartthrob_wish_list:add_to_wish_list_form} on product pages.
  6. 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}"}
  • Need channel/field binding: see Settings.
  • Need installer workflow: see Installation CP page.
  • Need tag parameters and variables: see Template Tags.
  • Need checkout update behavior: see Checkout Integration Behavior.

Control Panel Reference

Settings (.../index)

Form fields:

  1. wish_list_channel
  2. wish_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_channel and wish_list_field from 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_title against 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 unless row_id flow is used)
  • row_id (optional row filter)
  • status (optional; passed through wishlist lookup)

Top-level variables:

  • row_id
  • count
  • total_results
  • note
  • quantity
  • entry_id
  • purchased
  • price
  • title
  • unique_id
  • order_item_id
  • order_id
  • subtotal

Nested pair variables:

  • item_options pair with option fields including option_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 (default wish_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)
  • quantity
  • wish_list_entry_id
  • wish_list_url_title
  • item_options[...]

Posts to add_to_wish_list_action.

wish_list_total

Outputs total for wishlist items.

Parameters:

  • entry_id or url_title (one required)

wish_list_remaining_total

Outputs total for non-purchased quantity remaining.

Parameters:

  • entry_id or url_title (one required)

my_wish_lists

Outputs current member wishlist entries.

Parameters:

  • status (optional)
  • variable_prefix (default wish_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_results
  • wish_list_entry_id
  • wish_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_start
  • cartthrob_add_to_cart_start
  • cartthrob_add_to_cart_end
  • cartthrob_pre_process
  • cartthrob_on_authorize
  • cartthrob_on_fail (via remove_wish_list_entry_id)
  • cartthrob_on_decline (via remove_wish_list_entry_id)

High-level behavior:

  1. Wishlist identifiers can be injected into CartThrob add-to-cart forms.
  2. Row-level wishlist item options can be copied to cart requests.
  3. Cart items keep wishlist metadata for later order processing.
  4. On authorization, purchased counts and order references are written back to wishlist rows.