Orders Overview

Orders placed with CartThrob can be saved to an Orders channel. Additionally, purchased items can be saved to a channel of their own tied to the purchaser's member account. This is a great option if you want to associate a member account with a download or other intangible product. Please see the Purchased Items Overview for more details.

Setup and Configuration

Based on your backend settings, order data can be saved to a channel upon successful checkout.

channel Setup

Create the orders channel. If you used the "Auto-Install Templates" option of the CartThrob extension, your Orders channel should already be correctly configured.

Available Fields

All of the following fields can be mapped to channel fields in the CartThrob backend. This means that customer checkout data will be automatically stored by CartThrob in the correct channel field.

  • Subtotal
  • Order Items (matrix)
  • Tax
  • Shipping
  • Total
  • Transaction ID
  • CC Last Four Digits
  • Coupon Codes
  • Shipping Method
  • Customer Name
  • Customer Email
  • Customer Phone
  • Full Billing Address
  • Billing First Name
  • Billing Last Name
  • Billing Address
  • Billing Address 2
  • Billing City
  • Billing State
  • Billing Zip
  • Full Shipping Address
  • Shipping First Name
  • Shipping Last Name
  • Shipping Address
  • Shipping Address 2
  • Shipping City
  • Shipping State
  • Shipping Zip

Items Custom channel Field

Note the items field above. Purchased items that are stored in the Orders channel are stored as a serialized string of data, containing (at a minimum) entry_id, quantity, and title. CartThrob adds a new custom field type called "CartThrob Order Items" that can be used to automatically display this data in a readable format. When you create your items channel field, simply select the CartThrob Order Items field.

Selecting the CartThrob Order Items custom field \ image

Viewing the CartThrob Order Items custom field \ image

Advanced Stuff

One really interesting feature of this custom field type is that it can dynamically add and store configured product information. Each new configuration option will be stored in this field, regardless of the name or number of configuration options. In the screenshot below, you'll see that a size field was added on the fly to the item data field during checkout. For more information about configuration options, see the Add to Cart Form tag documentation.

image

Using FieldFrame for the Order Items field

If, for some reason you plan to use FF Matrix (version 1) for the order items field, your custom field should have at least the following text fields: a column for entry_id, quantity and title (in that order) to correctly display purchased item data. Advanced usage note: FF Matrix is not suitable for dynamically storing configured items like the custom CartThrob Order Items field noted above.

Backend Configuration

Configure the CartThrob backend. Go to the Admin › Utilities › Extensions › CartThrob › Settings. Click on Order Settings. Once on this page, map the order fields to the fields you just created.

Site Owner's Completed Order Report

Most site owners probably want to know how much money they're making. To display orders, you will need to create a template to do so. For more information about outputting order data in your templates, please review the documentation of the Order Items custom channel field.

If you would like to display order reports templates to your store owners, we currently suggest adding a link to your order template in the store owner's control panel. You may also have interest in using the Framed Module to display those reports directly within your control panel. In the future CartThrob will have the option to add an orders template tab in the control panel backend, but for now, please use the methods mentioned above.