Displaying a list of shipping methods as a radio group on the checkout page

  1. Open the shipping_rates.tpl file located in the skins/[CUSTOMER_ACTIVE_SKIN]/customer/cart_pages directory of your CS-Cart installation, where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.
  2. Find and replace the following part of code there:
    <div class="form-field">
            <label for="ssr"><b>{$lang.shipping_method}:</b></label>
            <select id="ssr" name="shipping_ids[]" onchange="sf.submit();">    
            {foreach from=$shipping_rates key=shipping_id item=s_rate}
            <option value="{$shipping_id}" {if $cart.shipping.$shipping_id}selected="selected"{/if}>{$s_rate.name} ({$s_rate.delivery_time}) - {include file="common_templates/price.tpl" value=$s_rate.rates|@array_sum}</option>
            {/foreach}        
            </select>
        </div>

    with this one:
    <div>
            <label for="ssr"><b>{$lang.shipping_method}:</b></label>
                    {foreach from=$shipping_rates key=shipping_id item=s_rate}
                        {assign var="rate" value="0"}
                        {foreach from=$s_rate.rates key=key_id item=r}{math equation="x + y" x=$rate y=$r assign="rate"}{/foreach}
                        <p>
                            <input id="ssr" type="radio" class="valign radio" name="shipping_ids[0]" value="{$shipping_id}" {if (!$cart.shipping && $smarty.foreach.fee.first) || $cart.shipping.$shipping_id}checked="checked"{/if} onclick="shippings_form.submit();"/>&nbsp;<label for="est_{$shipping_id}" class="valign">{$s_rate.name} ({$s_rate.delivery_time}) - {include file="common_templates/price.tpl" value=$rate}</label>
                        </p>
                    {/foreach}
        </div>
  3. Save the file.

Noticed an error in the article or it is not clear enough? Any suggestions to improve it? Please let us know by filling in the feedback form. Click here.