Template Tags: Utilities
Utility tags add help manipulate cart data, and interact with the CartThrob application.
Actions
- cart_empty_redirect When placed in a template, redirects the visitor if the cart is empty.
Bug Testing
- debug_info Outputs debug information about the cart.
Conversion
- arithmetic Can be used to calculate numbers. Keep parse order in mind when passing in variables.
- convert_country_code Takes a country code and outputs the countries name.
- get_card_type Outputs the card type (brand) for the provided credit card number.
- view_converted_currency Uses xurrency.com to output currency conversion. Because this uses an external API, it can be slow. Not recommended for use on many currency conversions at the same time.
- view_decrypted_string Decrypts a string
- view_encrypted_string Encrypts a string
- view_formatted_number Applies or removes currency symbols, commas, and decimals from numbers as needed.
Settings Related
- view_setting Outputs CartThrob settings values.
- set_config Allows you to manipulate CartThrob settings dynamically for the current visitor. Useful in changing shipping methods on the fly, tax plugins, gateways, or other advanced operations