Get Shipping Options

This tag pair outputs available shipping options. For instance, it will return available options used in conjunction with the shipping plugin called "Customer Selectable Flat Rates". The information it returns varies by shipping plugin.

Table of Contents



You can output rates for the specific shipping plugin set in the setting by passing in the short_name of your chosen shipping plugin. The short_name for the shipping plugin can be found on its configuration page. This is really only useful when using multiple live rates plugins (which are not included with CartThrob by default.)


Allows you to add a prefix to all variables within the tag to avoid variable collisions with another tag.


This is an example of how you could then call the entry_id variable within the tag.


This only applies if using the "single" version of the tag. (not when using the tag pair). By default the single tag outputs the shipping method's title & price. If you want to hide the price, use


If unset, the price will be shown like so: My Shipping Option - 0.00



Short name of the shipping option.



Long (descriptive) title of a shipping option.



Cost of the shipping option.



This outputs selected="selected" if that shipping option is chosen. For use in drop-down list.



This outputs checked="checked" if that shipping option is chosen. For use in radio groups.



This tag, when used as a tag pair will output content in a looping fashion. Count is the current loop number.



When this tag is used as a variable pair, this outputs the total amount of shipping options available.



Outputs any error messages (usually only used with Live Rates shipping plugins)



Though no_results will work with this tag when used by itself, as soon as you put it within another CartThrob form, EE will find content within the system and won't ouput no_results even if there are no shipping data being returned. Instead, you may want to try the following:

{exp:cartthrob:update_cart_form  return="store/checkout"} 

        {if custom_data:shipping_error}
            <p>There is a problem retrieving shipping rates from the shipping company. Please try again in a moment or contact us for assistance.</p>
            <p>Error: {custom_data:shipping_error}</p>
            <label for="shipping_option" class="forSelect">Shipping Option</label>
            {exp:cartthrob:get_shipping_options variable_prefix="liverates_"}

                {if liverates_count == 1}
                    <select name="shipping_option">
                    <option value="{liverates_rate_short_name}" {liverates_selected}>{liverates_rate_title} - {liverates_price}</option>
                {if liverates_count == liverates_total_results}

                {if error_message}{error_message}{/if}

        <input type="submit"  class="cartButton" value="Next &raquo; "/>



Used singly:

{exp:cartthrob:get_shipping_options} will automatically output a select input field.

Using as a tag pair:

<select name="shipping_option">
        <option value="{rate_short_name}" {selected}>{rate_title} - {price}</option>