{*
* 2007-2020 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@buy-addons.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author    Buy-addons    <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel-heading" style="margin-top: 10px;border-top: solid 1px #eee;">
	<i class="icon-truck"></i>
	{l s='Shipping' mod='askforaquotemodul'}
</div>
{if !empty($result)}
	<div id="carrier_form" style="display: block;">
		<div class="box_shipping">
			<div class="form-group td_float_left">
				<label class="control-label col-lg-3">
					{l s='Delivery option' mod='askforaquotemodul'}
				</label>
				<div class="col-lg-9 td_float_left">
					<select name="delivery_option" class="td_delivery_option"  onchange="getShippingcost(this)">
						{foreach from=$result key=key_result item=item_result}
							{if !isset($shippingprice) || ($id_carrier == $key_result)}
								{assign var="shippingprice" value="{$item_result['total_price_without_tax']}"}
								{assign var="shippingtax" value="{$item_result['total_shipping_tax']}"}
							{/if}
							{if !isset($freeshipping)}
								{assign var="freeshipping" value="{$item_result['is_free']}"}
							{/if}
							<option class="option_carrier" value="{$key_result|escape:'htmlall':'UTF-8'}" data-price="{$item_result['total_price_without_tax']|escape:'htmlall':'UTF-8'}" data-price-format="{displayPrice price=$item_result['total_price_without_tax'] currency=$id_currency}" {if $id_carrier==$key_result}selected{/if}>{$item_result['carrier_name']|escape:'htmlall':'UTF-8'}</option>
						{/foreach}
					</select>
				</div>
			</div>
			<div class="form-group td_float_left">
				<label class="control-label col-lg-3" for="shipping_price">
					{l s='Shipping price (Tax excl.)' mod='askforaquotemodul'}
				</label>
				<div class="col-lg-9 td_float_left td_shipping_cost">
					{if $shippingprice == 0}
						<input type="hidden" data-price="0" data-price-format="{displayPrice price=0 currency=$id_currency}" class="shipping_price_selected"></input>
					{else}
						<input type="hidden" data-price="{$shippingprice|escape:'htmlall':'UTF-8'}" data-price-format="{displayPrice price=$shippingprice currency=$id_currency}" data-tax="{$shippingtax|escape:'htmlall':'UTF-8'}" class="shipping_price_selected"></input>
					{/if}
					<p id="shipping_price" class="form-control-static" name="shipping_price">
						{if $shippingprice == 0}
							{l s='Free shipping' mod='askforaquotemodul'}
						{else}
							{displayPrice price=$shippingprice currency=$id_currency}
						{/if}
					</p>
				</div>
				<i id="price_shipping_Loader" class="icon-refresh icon-spin" style=""></i>
			</div>
			<div class="form-group">
				<label class="control-label col-lg-3" for="free_shipping">
					{l s='Free shipping' mod='askforaquotemodul'}
				</label>
				<div class="input-group col-lg-9 fixed-width-lg">
					<span class="switch prestashop-switch">
						<input type="radio" name="free_shipping" id="free_shipping" value="1" {if $free_shipping == 1}checked{/if} onchange="baquote_updateQuoteCart()"/>
						<label for="free_shipping" class="radioCheck">
							{l s='Yes' mod='askforaquotemodul'}
						</label>
						<input type="radio" name="free_shipping" id="free_shipping_off" value="0" {if $free_shipping != 1}checked{/if} onchange="baquote_updateQuoteCart()"/>
						<label for="free_shipping_off" class="radioCheck">
							{l s='No' mod='askforaquotemodul'}
						</label>
						<a class="slide-button btn"></a>
					</span>
				</div>
			</div>
		</div>
	</div>
{else}
	<div style="" class="td_carriers_err alert alert-warning">{l s='No carrier can be applied to this order' mod='askforaquotemodul'}</div>
{/if}