Template Tags: Shipping
You can watch a tutorial video on shipping here.
Shipping rates are calculated by shipping plugins. The choice of shipping plugin, and settings affects the cost of shipping for your customer. Depending on the plugin, customer location, or the products in the cart may also affect the cost of shipping. See also: Creating Shipping Plugins to develop your own plugins.
Standard Shipping Tags
This tag is used to output a select dropdown field for shipping plugins with customer selectable options. Examples of this type of plugin are "Customer Selectable Flat Rates", or any live rates plugin. This only outputs a field. Place this tag in any CartThrob form tag to capture the customer selection.
Shipping info tags
- cart_info Outputs customer info, cart counts and totals, including shipping totals
- cart_subtotal_plus_shipping Outputs subtotal plus shipping
- cart_shipping Outputs shipping cost
- selected_shipping_option Outputs the custmers selected shipping option (if )
Live Rates Tags
- get_live_rates_form Outputs a form used to gather the required information needed to get a rate quote
- get_shipping_options When used with a live rates plugin, this tag will attempt to get live rates without requiring additional customer information. Generally though, these rates will not be accurate until the customer updates their location information to the correct location.
Live rates tags work only with live rates shipping plugins, including UPS, USPS, and FedEx. These plugins are not included by default with CartThrob and currently are available only by request.
It can be difficult to achieve satisfactory rates using live rates shipping plugins, because they require a high amount of data. For them to work their best, you must have a very refined shipping process. All live rates plugins require the following:
- Shipping from location (this is handled in the settings for the shipping plugin by default)
- Shipping to location (this is the customer's shipping address, or billing address if a shipping address can't be found)
- Package weight
- Package size (length x width x height)
- Shipping to location type (residential or commercial)
- Shipping from location type (residential or commercial)
- Package type (these are defined by the shipper)
- Shipping method (eg. FedEx Ground, Overnight, Priority)
- Shipping time (the time of day packages are shipped) 10 Pickup type (regular pickup, counter dropoff, one-time pickup)
If your customer does not have a clearly defined shipping methodology already written down and available to you, you should probably council them not to use Live Rates shipping, and instead use a system like
- Zone Rates
- Threshold Rates
- Per Location Rates
Generally one of the above can be used to approximate live rates shipping costs, while including a bit extra for handling costs. Your customer can set their own shipping costs as needed, and can easily adjust these costs to factor in any incidentals that may come up in shipping. See also: Creating Shipping Plugins to develop your own plugins.