Table of Contents
Automatically selecting returned shipping rate
Using version 2.0? There is a new snippet available for our latest version, available from here.
This script automatically selects the first returned shipping option with live rates, and updates the total price of the checkout accordingly.
Step 1: Add Javascript
Paste the following code right before the closing </head>
tag of your checkout template:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery(document).ajaxComplete(function(event, request, settings) { if (settings.url.indexOf('GetShippingCost') != -1) { $("#fc_shipping_methods_inner input[type='radio']:first").prop("checked", true); FC.checkout.updatePrice(i); } }); }); </script>