Shipping

Table of Contents

Overview

Generally speaking, in any business shipping calculations are calculated using one of the following methods or a combination of:

  1. Per item
  2. Per location
  3. Aggregated (all items combined) package size (weight or dimensions)
  4. Per shipment
  5. Item quantity costs
  6. Customer selectable rates
  7. Product category (product group, shipping group, etc)
  8. Third party API (FedEx, UPS, USPS, etc)

Additionally you may want to offer

  1. Free shipping for meeting specific criteria
  2. Discounts for meeting specific criteria

CartThrob's shipping system can use all of those factors to calculate shipping, but out of the box may not be configured to, or the shipping plugins available may not factor in your entire shipping methodology. For a more detailed look, review information about included plugins below, and the limitations of what they can and can't do. If an included plugin doesn't do exactly what you need out the box, feel free to ask us about it in the forums.

Available Shipping Methods

While CartThrob doesn't promise to manage every shipping scenario out of the box (and in some ways is somewhat limited out of the box) any number of factors can be used to calculate shipping costs accurate with CartThrob using our shipping plugin system. At its simplest, you can use one of the following included shipping methods to calculate shipping costs (at the time of this writing this is a complete list of included shipping plugins; additional plugins may be available):

Shipping Methods Overview

The following contains short descriptions of each available shipping plugin. If you don't see a shipping method that you require, please contact us. We can either develop a custom plugin for you, or it's possible that we have already created something similar to what you need in the past and can provide it at no additional cost or for a low-additional cost.

Per Item Rates

Like you might think, using this setting allows you to set individual shipping prices for every item in your store. If you use this option, you'll need to:

  1. make sure that you have a shipping cost (name it whatever you like) in each of your product channels,
  2. under CartThrob product channel options, make sure to map this shipping costs field that you plan to use to store shipping costs.

Per location rates

Rates are set based on the customers location, and optionally specific types of products, categories, or entry ids. Locations set in the plugin settings are matched to set customer locations in the following order:

  1. Region
  2. Zip Code/Postal Code
  3. State
  4. Country Code

If there is a corresponding rate & customer location that meets all set criteria (item id, category, etc) the rate will be applied. You can get quite specific with this plugin.

By location price threshold

This shipping method sets shipping costs incrementally based on the cost of the items in the cart for a specific location. For instance, from $1-10 could be set to $10 shipping, while carts totaling $11-20 could be billed at $15 shipping.

By location quantity threshold

This shipping method sets shipping costs incrementally based on the amount of the items in the cart. For instance, from 1-10 items could be set to $10 shipping, while carts with 11-20 items could be billed at $15 shipping.

By location weight threshold

This shipping method sets shipping costs incrementally based on the weight of the items in the cart. For instance, from 1-10 pounds could be set to $10 shipping, while carts with 11-20 pounds could be billed at $15 shipping. To use this option you need to:

  1. set a shipping weight for each item,
  2. under CartThrob product channel options, make sure to map your item weight field

By weight global rate

Shipping costs are set per pound (or other weight unit). To use this option you need to:

  1. set a shipping weight for each item,
  2. under CartThrob product channel options, make sure to map your shipping weight field.

Flat Rates

Customers can select from flat rates. This is a great option if you sell items that cost a specific amount to send, or if you plan to provide flat shipping rates. You can create multiple shipping options, for instance: Standard, Priority, Overnight, Super Saver Shipping. There is also an option to set a threshold "free" rate based on the cost of the cart. For instance, you could set this value to be "50" and all carts over $50 would be able to select this option for free. You will need to use the get_shipping_options tag to output options for the customer.

Single Flat Rate

Shipping costs are not calculated in anyway, a flat fee per transaction is set as the shipping cost.

Additional Methods

In addition to the included shipping plugins, you may also request live-rates plugins. Working with live rates from providers like UPS and FedEx require more effort and more understanding on your part than other included plugins, which is why they are currently request-only.

  • FedEx
  • UPS
  • USPS

Setting Up

CartThrob only evaluates one plugin at a time for everything in the cart. The selected shipping plugin should handle all shipping logic for all shipping. Depending on the complexity of your shipping requirements, this may mean that there are several plugins that will need to be merged together into a custom plugin. Feel free to contact us if you need a custom shipping plugin developed; our rates for shipping plugins are very reasonable and may save you development work or consideration.

Overall the process used to calculate rates is this:

Administrator Setup (settings and channel entries):

  1. Establish rates in CartThrob's shipping settings
  2. Add weight information or other required data to each item's entry (if using weight calculated rates)
  3. If using weight, or per item shipping costs, configure the channel entry fields in CartThrob's product channel settings

Customer Flow:

  1. Customer adds items to cart
  2. Shipping costs are displayed based on default location values (if shipping is location based). Default locations can be set in CartThrob » global settings
  3. Customer enters location information (if shipping is location based)
  4. Customer sees updated shipping costs.

Shipping costs are recalculated during every CartThrob form submission. If you are using location based calculations, and your customer changes their location in the final step (the checkout) the new location used during checkout will be used to recalculate shipping costs before payment is initiated. You may want to make note of that fact during checkout and give your customer the ability to update their shipping location before they checkout.

Generally what you need to set up in the backend and in the templates will depend on the following

  1. Is location a factor?
  2. Is weight a factor?
  3. Is customer shipping method selection a factor?
  4. Are you using live rates?

If you are using customer info for any of the calculations it's important to remember that the first moment a customer starts adding products to the cart, you may not know their location or other pertinent information. Shipping rates are calculated almost every time a customer info related form, or tag is used, so generally speaking shipping rates use the most up-to-date customer information available. Before that information can be factored in though, it must get into the system. Merely typing data into a field isn't enough; that data has to actually be submitted via a standard form submission, or an ajax form submission using one of CartThrob's form tags to make that data avaialable for shipping calculations.

Location considerations

At a minimum, if you are calculating based on location, you will need to capture the customer location before any calculations are made. You can set a default location in CartThrob's global settings, but for more accuracy you will need to capture the customer's actual location. Once the customer's location is captured, that location information will be used to determine correct shipping amount. Use one of CartThrob's form tags to capture customer location.

Weight

If weight is a factor in your shipping calculations:

  1. set a shipping weight for each item in its channel entry,
  2. under CartThrob product channel options, make sure to map the channel entry field where the weight is stored.

Selectable options

If your customer can select a shipping method (Flat Rates), at some point you'll need to make the customer select a rate. You will need to use the get_shipping_options tag to output options for the customer, and capture that information in one of CartThrob's form tags to capture that option.

Example

{exp:cartthrob:update_cart_form return="" }
    {exp:cartthrob:get_shipping_options}
    <input type="submit" value="Update Cart" /> 
{/exp:cartthrob:update_cart_form}

Live Rates

If you plan to use live rates from FedEx or UPS, I strongly encourage you to rethink this. Why? Because most of your clients won't know enough about their own shipping process to help you develop a methodology that actually matches how they plan to ship items. Live Rates systems show the customer rates based on available information. If any of that information is wrong, the costs can vary wildly. For more on this process, please click here.

Basically you'll need to capture lots of data, and you will probably need to modify our live-rates plugins to match your customer's specific methodology.

Customizing

Shipping plugins can be added to the system by placing new shipping plugins in the system / expressionengine /thirdparty/ cartthrob / cartthrob / plugins / shipping_plugins folder. Once placed in the folder, visit the CartThrob extensions panel to configure the new shipping plugin.

You can also develop your own shipping plugins using our documented API.