Save Shipping Option
save_shipping_option is an immediate-execution single tag that stores a selected shipping option in the active cart session.
This is a legacy helper (module-method tag), not a form tag.
See also:
- get_shipping_options
- selected_shipping_option
- update_cart_form
- get_live_rates_form
- shipping tag index
Parameters
shipping_option
Shipping option value to save.
If omitted as a tag parameter, CartThrob reads shipping_option from POST input.
shipping_option="ground"
return
Optional redirect path after save.
If omitted, no redirect is performed.
return="store/shipping"
Behavior and Constraints
- Resolves
shipping_optionfrom tag parameter or POST (shipping_option). - Saves the value into cart shipping info (
shipping_option). - Saves the cart session.
- Redirects only when
returnis provided.
Notes:
- This tag updates shipping option only. It does not fetch live rates or validate shipping plugin fields.
- For shipping quote workflows, use get_live_rates_form.
Examples
Set shipping option directly and redirect:
{exp:cartthrob:save_shipping_option shipping_option="ground" return="store/shipping"}
Save shipping option submitted from a standard form field:
<form method="post" action="{path='store/shipping'}">
<select name="shipping_option">
<option value="ground">Ground</option>
<option value="express">Express</option>
</select>
<input type="submit" value="Save" />
</form>
{exp:cartthrob:save_shipping_option return="store/shipping"}