Selling photos

Overview

When a business sells photos, what they’re generally doing is selling photo paper in a variety of preset sizes with any number of different images printed on them. You’ll generally only need one product with options for different image sizes and possibly different finishes. You can add as many images as you want, but you’ll really be selling one, or several base images with any one of hundreds or thousands of images.

Creating a store that sells custom or stock photography

Use the auto-install template system

CartThrob comes with an auto-install template system. In the “installation” settings, you’ll see a “cart_single_page_checkout” group of templates. Install that. This will install basic templates, along with the relevant channels. This setup doesn’t really cover the details of building a photo store, but it will at least simplify building checkout forms.

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 automated printing technologies (tutorial…)
  • Ask the store owner if they allow any customization of their photos or if they sell photo packages.

Create a product channel

  • Create a product channel
  • Create ONE entry that will serve as a base for all other entries.

Create a purchased items channel

The purchased items channel may not be necessary unless you have a lot of custom data being added to each image.

  • 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 ([has_purchased][])
  • 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}
            {/exp:cartthrob:order_items}
        {/exp:channel:entries}

Build your templates

In the templates is where the magic happens with this type of store. Basically, what you’ll be doing is adding the base item to the cart, but overriding some of its default values with information unique to one of the many images available.

Create templates for the following:

  • Add items to the cart (add_to_cart_form)
    • Add the base item’s entry id
    • Allow customers to configure price modifiers and item_options
    • Override the base item’s title and other details using parameters

        {exp:channel:entries channel="photos"}
            // put in the base item's entry id
            {exp:cartthrob:add_to_cart_form entry_id="123" title="{title}"}
                Buy this photo!
                <input type="submit" />
            {/exp:cartthrob:add_to_cart_form}
        {/exp:channel:entries}
  • View cart (cart_items_info)
  • Capture/update customer shipping / billing information (update_cart_form)
  • 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