Ajout et config du module Chronopost

This commit is contained in:
2021-09-22 23:03:39 +02:00
parent 7287fb7959
commit 08f1af5f96
60 changed files with 13945 additions and 18 deletions

View File

@@ -0,0 +1,191 @@
{loop type="delivery" name="chronopost-home-delivery" id=$module force_return="true"}
<tr style="display: none;" id="deliverytype-chronopost-home-delivery-tr">
<td colspan="3">
<div id="point-chronopost">
<div id="deliverytype-chronopost-home-delivery">
{chronopostHomeDeliveryDeliveryType}
{* Chrono13 *}
{if $isChrono13Enabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="1" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Chrono 13H delivery" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery to you or a personal address of your choice, before tomorrow 13H." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="1" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d='chronoposthomedelivery.fo.default'}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* Chrono18 *}
{if $isChrono18Enabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="16" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Chrono 18H delivery" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery to you or a personal address of your choice, before tomorrow 18H." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="16" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d="chronoposthomedelivery.fo.default"}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* Chrono Classic *}
{if $isChronoClassicEnabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="44" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Chrono Europe Classic delivery" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery to you or a personal address of your choice, anywhere in Europe." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="44" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d="chronoposthomedelivery.fo.default"}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* Chrono Express *}
{if $isChronoExpressEnabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="17" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Chrono Europe Express delivery" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery to you or a personal address of your choice, anywhere in Europe in less than 3 days." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="17" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d='chronoposthomedelivery.fo.default'}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* Fresh13 *}
{if $isFresh13Enabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="2R" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Fresh 13H delivery" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery of fresh products before 13H tomorrow." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="2R" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d='chronoposthomedelivery.fo.default'}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* Chrono10 *}
{if $isChrono10Enabled !== false}
{chronopostHomeDeliveryDeliveryPrice delivery-mode="2" country=$country}
{if $chronopostHomeDeliveryDeliveryModePrice}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Chrono10" d='chronoposthomedelivery.fo.default'}</strong> / {$chronopostHomeDeliveryDeliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{intl l="Delivery before 10H tomorrow." d='chronoposthomedelivery.fo.default'}
<div class="clearfix">
<button type="submit" name="chronopost-home-delivery-delivery-mode" value="2" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d='chronoposthomedelivery.fo.default'}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{/if}
{* TODO Add other delivery types *}
</div>
</div>
</td>
</tr>
<script>
function displayContentHomeDelivery () {
$("#deliverytype-chronopost-home-delivery-tr").show(function () {
$('.btn-checkout-next').hide();
$('#form-cart-delivery').find("> button").hide();
});
}
$(function(){
if ($("#delivery-method_{$module}").is(':checked')) {
displayContentHomeDelivery();
}
$('[name="thelia_order_delivery[delivery-module]"]', '.table-delivery').on('change', function(){
if($(this).attr('id') != 'delivery-method_{$module}') {
$("#deliverytype-chronopost-home-delivery-tr").hide();
$('.btn-checkout-next').show();
$('#form-cart-delivery').find("> button").show();
} else {
displayContentHomeDelivery();
}
});
});
</script>
{/loop}