garancia/themes/default/mobile/order-carrier-simple-2.tpl
2016-11-30 17:54:01 +01:00

159 lines
4.9 KiB
Smarty
Executable File

{if !$opc}
<script type="text/javascript">
//<![CDATA[
var orderProcess = 'order';
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
var currencyRate = '{$currencyRate|floatval}';
var currencyFormat = '{$currencyFormat|intval}';
var currencyBlank = '{$currencyBlank|intval}';
var txtProduct = "{l s='Product' js=1}";
var txtProducts = "{l s='Products' js=1}";
var orderUrl = '{$link->getPageLink("order", true)}';
var msg = "{l s='You must agree to the terms of service before continuing.' js=1}";
{literal}
function acceptCGV()
{
if ($('#cgv').length && !$('input#cgv:checked').length)
{
alert(msg);
return false;
}
else
return true;
}
$(document).ready(function()
{
// if($('#modeDeLivraison').lenght==0){
// $('.delivery_option_radio').click(function(){
// $('.delivery_option').removeClass('selected');
// $(this).parent().addClass('selected');
// alert('test');
// });
// }
});
{/literal}
//]]>
</script>
{else}
<script type="text/javascript">
var txtFree = "{l s='Free'}";
</script>
{/if}
{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1}
<script type="text/javascript">
{literal}
// <![CDATA[
// $('document').ready( function(){
// if ($('input#gift').is(':checked'))
// $('p#gift_div').show();
// });
//]]>
{/literal}
</script>
{/if}
{if !$opc}
<div id="carrier_area">
{else}
<div id="carrier_area" class="opc-main-block">
{/if}
<div class="order_carrier_content">
<div id="HOOK_BEFORECARRIER">
{if isset($carriers) && isset($HOOK_BEFORECARRIER)}
{$HOOK_BEFORECARRIER}
{/if}
</div>
<div class="delivery_options_address">
{if isset($delivery_option_list)}
{foreach $delivery_option_list as $id_address => $option_list}
<div class="delivery_options">
{foreach $option_list as $key => $option}
{* ANTADIS : don't show Mondial Relay *}
{assign var='mondial_relay_found' value=false}
{foreach $list_ids_carrier_mondial_relay as $id_carrier}
{if isset($option.carrier_list[$id_carrier])}
{assign var='mondial_relay_found' value=true}
{/if}
{/foreach}
{if $mondial_relay_found}
{continue}
{/if}
{* END ANTADIS : don't show Mondial Relay *}
<div class="delivery_option {*if ($option@index % 2)}alternate_{/if*}item {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}selected{/if}" >
<div class="radio">
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" {*onchange="{if $opc}updateCarrierSelectionAndGift();{else}updateExtraCarrier('{$key}', {$id_address});{/if}" *}id="delivery_option_{$id_address}_{$option@index}" value="{$key}" rel="{$id_address}" {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}checked="checked"{/if} />
</div>
<label for="delivery_option_{$id_address}_{$option@index}">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
{if $option.unique_carrier}
{foreach $option.carrier_list as $carrier}
<span class="delivery_option_title">{$carrier.instance->name}</span>
{/foreach}
{/if}
<span class="delivery_option_price">
{if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))}
{if $use_taxes == 1}
{convertPrice price=$option.total_price_with_tax}
{else}
{convertPrice price=$option.total_price_without_tax}
{/if}
{else}
{convertPrice price=0}
{/if}
</span>
<br/>
{if $option.unique_carrier}
{if isset($carrier.instance->delay[$cookie->id_lang])}
<span class="livr">{l s='Livraison de votre commande'}</span> <span class="delivery_option_delay">{$carrier.instance->delay[$cookie->id_lang]|replace:" dans votre Point Relais":"</span><span> dans votre Point Relais"}</span>
{/if}
{/if}
</td>
</tr>
</table>
{foreach $option.carrier_list as $carrier}
<input type="hidden" value="{$carrier.instance->id}" name="id_carrier" />
{/foreach}
</label>
</div>
{/foreach}
</div>
<div class="hook_extracarrier" id="HOOK_EXTRACARRIER_{$id_address}">{if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}</div>
{foreachelse}
<p class="warning" id="noCarrierWarning">
{foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address}
{if empty($address->alias)}
{l s='No carriers available.'}
{else}
{l s='No carriers available for the address "%s".' sprintf=$address->alias}
{/if}
{if !$address@last}
<br />
{/if}
{/foreach}
</p>
{/foreach}
{/if}
</div>
<div style="display: none;" id="extra_carrier"></div>
<div class="clear"></div>
</div>
</div>