0

What's the correct way to pull multiple rates from multiple shipping plugins? I tried using the below but it generates errors:

<select name="shipping_option">
{exp:cartthrob:get_shipping_options shipping_plugin="shipping_ups|shipping_usps"}
    <option value="{rate_short_name}" data-price="{price}" {selected}>{rate_title} - {price}</option>
{/exp:cartthrob:get_shipping_options}
</select>

Am I using the shipping_plugin parameter incorrectly?

0

That get_shipping_options tag only accepts one argument for the shipping_plugin parameter.

You can only have one shipping plugin active at a time. If you need both UPS and USPS options available at the same time, you'll need to combine those two plugins into a single plugin.

You can allow selection between those two shipping plugins using the multi_location_manager and custom_data. https://github.com/CartThrob/addon-multi-location-settings-manager

You could trigger the plugin update using an update_cart_from.

{exp:cartthrob:update_cart_form}
    <select name="custom_data[set_shipping]">
        <option value="shipping_ups" {if custom_data:set_shipping == "shipping_ups"}selected{/if}>UPS</option>
        <option value="shipping_usps" {if custom_data:set_shipping == "shipping_usps"}selected{/if}>USPS</option>
    </select>
    {exp:cartthrob:get_shipping_options}
    <input type="submit" value="Update Shipping Options" />
{/exp:cartthrob:update_cart_form}

The settings in the multi_location_manager would look like this:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.