Selling real products using CartThrob


Selling standard products is probably the most straight forward type of store you can create with CartThrob. Best practices for creating a store selling real products are outlined below.

Creating a store that sells shippable products

Use the auto-install template system

CartThrob comes with an auto-install template system. In the "installation" settings, you'll see a "cart" group of templates. Install that. You'll have a full set of cart templates to review, along with the relevant channels. While this setup won't be ideal for everyone, it's a good example of how to set up a full featured cart. The full cart template is probably a bit overly complicated for a basic learning tool, so it's also good to install some of the other examples which are more focused on a single operation (like selling t-shirts, or taking donations).

Interview the store owners

  • Find out how the store owner calculates tax per purchase (tutorial...)
  • Get detailed information about method the store owner uses for shipping (tutorial...)
  • Ask the store owner about their accepted payment methods (tutorial...)
  • Find out if the store owner uses any third party accounting or drop-shipping technologies (tutorial...)

Create a product channel

  • Create product channels to store product data
    • Assume each channel entry is a unique shippable product
      • Unless the item is built-to-suit after purchase, each inventory SKU is a unique item, even if its attributes are similar to another product
      • Inventory/stock levels are managed per channel.
        • Select one channel field per channel to store inventory/stock levels
        • or select one CartThrob Price Modifier field per channel
        • you can't select more than one field to store stock levels per channel
    • Create channel fields appropriate to this type of product
      • Create fields for unique item attributes like dimensions, flavors, styles
      • Create fields to store images for the items. For instance, shirts might have multiple images for sizes or styles
  • Create a new product channel for each unique type of product. For instance, create unique channels for:
    • configurable products
    • downloadable products
    • general products

Create a purchased items channel

  • When products can be customized by the customer create a purchased items channel.
  • Configure cartthrob to recognize your purchased items channel
  • Create fields (tutorial...) in the purchased items channel to store configuration data if:
    • Customer notes can be added
    • Products have unique configurations (size, color, type, etc)
    • Personalization is added per product

Create an orders channel

  • Configure CartThrob to recognize your orders channel
  • Orders channel data is required to
    • Capture customer information
    • Capture payment errors
    • Output information about items related by customer purchase patterns (also_purchased)
    • Display information about past orders (order_totals)
    • Generate lists of past items purchased by the customer (order_items)
    • Help identify when an item has been purchased in the past (is_purchased_item)
  • Orders channel data can be output to create a (customer account page)

Configure Membership

It's common to allow customers to register with your site so that they can maintain a purchase history and store their customer details. 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 ExpressionEngine channel entries tag to output purchase data

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

Set up product categories.

When you output your product entries, you may want to display the products in different categories. ExpressionEngine's default categories system works well for this.

Build your templates

Create templates to do the following: