Taking donations with CartThrob

Overview

If you are only taking donations with CartThrob, your set up may be rather simple. At a minimum all you need to take donations with CartThrob is the checkout_form. Several types of donation methods are outlined below

Use the auto-install template system

Regardless of your chosen method, use the auto-install template system to get started. CartThrob comes with an auto-install template system. In the "installation" settings, you'll see a "cart_donations" group of templates. Install that. You'll have a basic donation template set up with associated channels. While this setup won't be ideal for everyone, it's a good example of how to set up a cart that takes donations, and is loaded with notes in the templates.

Donation methods

Basic Donations

Create an orders channel

  • Configure CartThrob to recognize your orders channel
  • Orders channel data is required to
    • output reports in CartThrob's backend
    • capture donor information
    • capture payment errors

Create templates

Advanced Donations

Create a donations channel

  • Create a channel for donations if you plan to offer a number of donation options, For example:
    • donations with preset pricing levels
    • donations that provide different benefits to purchasers
    • donations to different groups or charities

Create an orders channel

  • Configure CartThrob to recognize your orders channel
  • Orders channel data is required to
    • output reports in CartThrob's backend
    • capture donor information
    • capture payment errors

Create a purchased items channel

  • Create a purchased items channel if you plan to allow your donor to display and edit information attached to their donation.
  • Configure cartthrob to recognize your purchased items channel
  • Create fields (tutorial...) in the purchased items channel to store configuration data if:
    • donor notes can be added
    • donations have unique configurations (charity, charity options, mission)
    • Personalization is added per donation (memorials, dedications, announcements)

Configure Membership

It's common to allow donors to register with your site so that they can maintain an account history and store their personal information. If you plan to allow customer membership

  • Create login, registration, and forgot-password pages
    • You can use ExpressionEngine's built in membership templates. If you find them limited, you can use:
      • Profile:Edit greatly simplifies registration and user maintenance
      • User and Zoo Visitor are also popular methods of simplifying member registration
  • Configure CartThrob's member settings as needed
  • Create an account page where the customer can review account details and past purchases

    • Use the order items tag combined with EE channel entries tag to output information about past donations.

      {exp:channel:entries author="CURRENT_USER" channel="orders"}
          {exp:cartthrob:order_items channel="orders" order_id="{entry_id}"}
              Your purchased {title} for {price}
          {/exp:cartthrob:order_items}
      {/exp:channel:entries}

Build your templates

Create templates to do the following:

  • Add items to the cart (add_to_cart_form)

    • Add a price field to the add_to_cart_form form:

      <input type="text" value="" name="price" />
    • Set the allow_user_price parameter. This allows the customer to set their own price
    • to capture data (for instance a note) collect the data as an item option

      <input type="text" name="item_options[donor_note]" />
  • View cart (cart_items_info)
  • Initiate payment (checkout) (checkout_form)
  • Display transaction information page (a "thanks" page) (submitted_order_info)
    • Display checkout errors if order unsuccessful
    • Display transaction id if order successful