garancia/themes/default/order-carrier.tpl

166 lines
5.7 KiB
Smarty
Executable File

{*
* 2007-2013 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@prestashop.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 PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{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}
<div class="delivery_option {*if ($option@index % 2)}alternate_{/if*}item {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}selected{/if}" >
<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} />
<label for="delivery_option_{$id_address}_{$option@index}">
{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>
<input type="hidden" value="{$option.total_price_with_tax}" />
{if $option.unique_carrier}
{if isset($carrier.instance->delay[$cookie->id_lang])}
<br /><br /><span class="livr">{l s='Livraison de votre commande'}</span>
<br/><span class="delivery_option_delay">{$carrier.instance->delay[$cookie->id_lang]}</span>
{/if}
{/if}
{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">
{$restricted_product_name = $cart->getExcludedUPSProductNameForUPSDelivery()}
{if $restricted_product_name!=''}
{l s='"%s" est un soin qui ne peut malheureusement pas être transporté par voie aérienne.' sprintf=$restricted_product_name}
<br />
{l s='Afin de poursuivre votre commande, nous vous conseillons de le retirer de votre panier ou de choisir une autre adresse de livraison.'}
{else}
{foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address}
{if empty($address->alias)}
{l s='No carriers available.'}
{else}
{l s='No carriers available for the test address "%s".' sprintf=$address->alias}
{/if}
{if !$address@last}
<br />
{/if}
{/foreach}
{/if}
</p>
{/foreach}
{/if}
</div>
<div style="display: none;" id="extra_carrier"></div>
<div class="clear"></div>
</div>
</div>