{form->start name="formCheckoutShippingMethod" method="post" action="" formType="ajax_form"}
{assign var="continuetopaygate" value="yes"}
<ul class="content">
<h3 class="d-block d-md-none h4 font-rglr mb-3">{$language.lblShippingMethod}</h3>
	{if $shippingMethods|@count|default:0>0}
    {assign var="shippingMethodCounter" value="1"}

		{foreach $shippingMethods as $items key="key"}
		{if $group_shipping_cost=='Yes'}	
				{assign var="key" value=$items['businessID']} 
			{/if}
			<li class="clearfix ajaxCartItems" id="ajaxCartItems{$key}">
				<h6 class="item-title font-bold">{$items.itemName|unescape}</h6>
				<ul id="ajaxShippingMethods" class="mb-3">
				{if $items.methods|@count|default:0>0}
					{foreach $items.methods as $method item="setkey" name="k"}
						<li class="clearfix  shippingMthd">
                        {assign var="methodName" value="{$method.methodName}"}
                        {assign var="showShippingFee" value="Yes"}
                        {if $items.free_shipping=='true'}
                            {assign var="methodName" value="{$language.lblFreeShippingPromotion}"}
                            {assign var="showShippingFee" value="No"}
                        {/if}
                        {if $smarty.foreach.k.iteration eq 1} 
						{form->radio name="shippingMethod_"|cat:$key id="shippingMethodID_"|cat:$shippingMethodCounter
						options=$method.methodID|cat:"->"|cat:$methodName class="shippingMethodSelect customradio"
						value=$items.shippingMethodID group_shipping_cost=$group_shipping_cost ref=$key checked="checked"}
                         {else}
                        {form->radio 
						name="shippingMethod_"|cat:$key
                        id="shippingMethodID_"|cat:$shippingMethodCounter
						options=$method.methodID|cat:"->"|cat:$methodName
						class="shippingMethodSelect customradio"
						value=$items.shippingMethodID
						group_shipping_cost=$group_shipping_cost
						ref=$key}
                        {/if}   
                        <label for="shippingMethodID_{$shippingMethodCounter}" class="custom-label "> 
                       &nbsp;
						</label>
                        {if $showShippingFee|default:''=='Yes'}
                            {$method.shippingCharge|price:'Full':$cartData.currencyID:$cartData.userCurrencyID}
                        {/if}						
						{if $method.settingsGroupKey !='free_shipping' && $method.settingsGroupParent!=1}
							{if $method.shippingtype=='Free'}
								( {$language.lblFree} )
							{/if}	
						{/if}
						{if $method.shippingTax|default:0 >0}
							(Tax Inc.)
						{/if}
						</li>
                    {assign var="shippingMethodCounter" value=$shippingMethodCounter+1}	
					{/foreach}
                                {elseif $items.free_shipping == 'true'}      
                                    {assign var="methodName" value="{$language.lblFreeShippingPromotion}"}
                                    {assign var="showShippingFee" value="No"}
                                    {form->radio name="shippingMethod_"|cat:$key id="shippingMethodID_"|cat:$shippingMethodCounter
						options=$method.methodID|cat:"->"|cat:$methodName class="shippingMethodSelect customradio"
						value=$items.shippingMethodID group_shipping_cost=$group_shipping_cost ref=$key checked="checked"}
				{else}
                                    {assign var="continuetopaygate" value="no"}
					<li>
					<div class="warning">{$language.lblNoShippingMethodAvilable}</div>
					</li>
					
				{/if}
				</ul>
		</li>	
		{/foreach}	
		{if $continuetopaygate|default:'yes' eq 'yes'} 
                {*{if $items.methods|@count|default:0>0}*} 
		<li class="clearfix">
			<div class="" >
			{form->button name="submitCheckoutShippingMethod" value=$language.lblProceed class="btn btn-secondary btn-md proceedBtn"}
			{form->button  name="submitCheckoutShippingMethodLoader" style="display:none" disabled="disabled"  id="submitCheckoutShippingMethodLoader" class=" buttonDisable btn btn-secondary btn-md proceedBtn" value="{$language.lblProceed}"}            

			</div>
		</li>
        {/if}
	{else}
		<li>{$language.lblNoShippingMethodAvilable}</li>
	{/if}
	
	
</ul>	
{form->close}
{form->validate_script form="formCheckoutShippingMethod"}