Global Tag Variables
These tags are available in all CartThrob forms and in the Cart Info, Cart Items Info, and Customer Info tag pairs.
- Add Coupon Form
 - Add To Cart Form
 - Cart Info
 - Cart Items Info
 - Checkout Form
 - Customer Info
 - Download File Form
 - Multi Add To Cart Form
 - Save Customer Info Form
 - Update Cart Form
 
Table of Contents
Cart Info Variables
These variables output data from the current cart. Each variable is available in the tag pairs listed above.
- cart_subtotal
 - cart_tax
 - cart_shipping
 - cart_discount
 - cart_total
 - cart_subtotal_numeric
 - cart_tax_numeric
 - cart_shipping_numeric
 - cart_discount_numeric
 - cart_total_numeric
 - cart_tax_rate
 - cart_tax_name
 - total_items
 - total_unique_items
 - cart_entry_ids
 - shipping_option
 
cart_subtotal
Cart total minus shipping and tax, without discounts applied
{cart_subtotal}
$11.95cart_tax
The amount of tax calculated for all items in the cart.
{cart_tax}
$1.95cart_shipping
Cost of shipping for all items in the cart
{cart_shipping}
$13.95cart_discount
Discounted amount for all items in the cart
{cart_discount}
$10.95cart_total
Cart total including shipping and tax, without discounts applied
{cart_total}
$13.95cart_subtotal_numeric
Cart total minus shipping and tax, without discounts applied, without any number formatting. Useful in conditionals.
{cart_subtotal_numeric}
11.95cart_tax_numeric
The amount of tax calculated for all items in the cart, without any number formatting. Useful in conditionals.
{cart_tax_numeric}
1.95cart_shipping_numeric
Cost of shipping for all items in the cart, without any number formatting. Useful in conditionals.
{cart_shipping_numeric}
13.95cart_discount_numeric
Discounted amount for all items in the cart, without any number formatting. Useful in conditionals.
{cart_discount_numeric}
10.95cart_total_numeric
Cart total including shipping and tax, without discounts applied, without any number formatting. Useful in conditionals.
{cart_total_numeric}
13.95cart_tax_rate
The current tax rate being used to calculate the cart total.
{cart_tax_rate}
7%cart_tax_name
The name of the current tax rate being used to calculate the cart total.
{cart_tax_name}
Californiatotal_items
The total number of items in the cart (number of items X quantity)
{total_items}
12total_unique_items
The total number of unique items in the cart. This ignores quantities, and looks solely at the total number of unique products.
{total_unique_items}
2cart_entry_ids
A pipe delimited list of product entry IDs currently in the cart
{cart_entry_ids}
1|12|123|1234shipping_option
The user's selected shipping option, if applicable to the shipping plugin you are using.
{shipping_option}
UPS-By Weight Global RateCustomer Info Variables
These tags allow you to access customer data that has been saved to the cart session using save_customer_info_form, update_cart_form, or any other CartThrob form. If you have a multi-page checkout, this tag paired with update_cart_form makes it easy to collect and reuse customer information throughout the customer's shopping experience.
Each input listed in global form fields has a matching output variable here. Each variable is prefixed with customer_ to avoid name collision with ExpressionEngine's member profile variables and other custom_fields used in your channels.
- customer_first_name
 - customer_last_name
 - customer_address
 - customer_address2
 - customer_city
 - customer_state
 - customer_zip
 - customer_company
 - customer_country
 - customer_country_code
 - customer_region
 - customer_phone
 - customer_email_address
 - customer_shipping_first_name
 - customer_shipping_last_name
 - customer_shipping_address
 - customer_shipping_address2
 - customer_shipping_city
 - customer_shipping_state
 - customer_shipping_zip
 - customer_shipping_company
 - customer_shipping_country
 - customer_shipping_country_code
 - customer_shipping_company
 - customer_ip_address
 - customer_weight_unit
 - customer_language
 - customer_use_billing_info
 - customer_description
 - customer_card_type
 - customer_expiration_month
 - customer_expiration_year
 - customer_po_number
 - customer_card_code
 - customer_CVV2
 - customer_issue_number
 - customer_transaction_type
 - customer_bank_account_number
 - customer_check_type
 - customer_account_type
 - customer_routing_number
 - customer_begin_month
 - customer_begin_year
 - customer_bday_month
 - customer_bday_day
 - customer_bday_year
 - customer_currency_code
 - customer_shipping_option
 - customer_success_return
 - customer_cancel_return
 - custom_data:your_data_field_name
 
customer_first_name
{customer_first_name}
Kingcustomer_last_name
{customer_last_name}
Randorcustomer_address
{customer_address}
1 Miro Waycustomer_address2
{customer_address2}
Turret 1customer_city
{customer_city}
Eterniacustomer_state
{customer_state}
ETcustomer_zip
{customer_zip}
63303customer_company
{customer_company}
Mattelcustomer_country
{customer_country}
United Statescustomer_country_code
{customer_country_code}
USAcustomer_region
{customer_region}
Trondheimcustomer_phone
{customer_phone}
555-555-5555customer_email_address
{customer_email_address}
[email protected]customer_shipping_first_name
{customer_shipping_first_name}
Queencustomer_shipping_last_name
{customer_shipping_last_name}
Marlenacustomer_shipping_address
{customer_shipping_address}
1 Miro Waycustomer_shipping_address2
{customer_shipping_address2}
Spire 12customer_shipping_city
{customer_shipping_city}
Eterniacustomer_shipping_state
{customer_shipping_state}
ETcustomer_shipping_zip
{customer_shipping_zip}
63303customer_shipping_company
{customer_shipping_company}
Mattelcustomer_shipping_country
{customer_shipping_country}
United Statescustomer_shipping_country_code
{customer_shipping_country_code}
USAcustomer_shipping_company
{customer_shipping_company}
Mattelcustomer_ip_address
{customer_ip_address}
192.168.1.1customer_weight_unit
{customer_weight_unit}
lbscustomer_language
{customer_language}
encustomer_use_billing_info
{customer_use_billing_info}
Yescustomer_description
{customer_description}
Equipment Purchasecustomer_card_type
{customer_card_type}
Visacustomer_expiration_month
{customer_expiration_month}
01customer_expiration_year
{customer_expiration_year}
12customer_po_number
{customer_po_number}
123456customer_card_code
{customer_card_code}
123customer_CVV2
{customer_CVV2}
1234customer_issue_number
{customer_issue_number}
123customer_transaction_type
{customer_transaction_type}
Digital Goodscustomer_bank_account_number
{customer_bank_account_number}
123456789customer_check_type
{customer_check_type}
Commercialcustomer_account_type
{customer_account_type}
Checkingcustomer_routing_number
{customer_routing_number}
0812345customer_begin_month
{customer_begin_month}
02customer_begin_year
{customer_begin_year}
09customer_bday_month
{customer_bday_month}
08customer_bday_day
{customer_bday_day}
02customer_bday_year
{customer_bday_year}
75customer_currency_code
{customer_currency_code}
USDcustomer_shipping_option
{customer_shipping_option}
Groundcustomer_success_return
{customer_success_return}
/mysite/successcustomer_cancel_return
{customer_cancel_return}
/mysite/failcustom_data:your_data_field_name
Prints out custom data saved in the save_customer_info_form.
{custom_data:your_data_field_name}Parameters
variable_prefix
This parameter allows you to set a custom prefix for the variables contained within the form tag pair. This is useful to avoid variable collisions when nesting multiple tag pairs.
variable_prefix="custom_prefix:"
{exp:cartthrob:checkout_form variable_prefix="custom_prefix:"}
    {if custom_prefix:no_results}
        NO RESULTS
    {/if}
    {custom_prefix:cart_total}
{/exp:cartthrob:checkout_form}