Selected Shipping Option
selected_shipping_option outputs the currently selected shipping option short name.
See also:
Parameters
This tag has no tag-specific parameters.
Output
Returns the selected shipping option value (for example a short name like priority_overnight).
If no shipping option is currently saved in cart shipping info, it falls back to the shipping plugin default option.
Behavior and Constraints
- Reads
shipping_info('shipping_option')from the cart first. - If no cart value is present, returns
api_cartthrob_shipping_plugins->default_shipping_option(). - Output is typically a short-name key (not a display label).
- If both cart value and plugin default are empty, output is empty.
Examples
Basic usage:
{exp:cartthrob:selected_shipping_option}
Possible output:
priority_overnight
Simple conditional usage:
{if "{exp:cartthrob:selected_shipping_option}" == "priority_overnight"}
Expedited shipping is selected.
{/if}