Ajout et config du module Chronopost
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<br>
|
||||
<div class="col-md-12 row form-container">
|
||||
{form name="chronopost_home_delivery_configuration_form" type="chronopost_home_delivery_configuration_form"}
|
||||
<form class="" action="{url path='/admin/module/ChronopostHomeDelivery/config'}" method="post">
|
||||
<div class="title">{intl l="Chronopost informations"}</div>
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
hide_save_and_close_button = true
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title">{intl l="Service Configuration" d='chronopost.home.delivery.bo.default'}</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6">
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
|
||||
{render_form_field field="success_url" value={url path="/admin/module/ChronopostHomeDelivery"}}
|
||||
|
||||
{render_form_field field="chronopost_home_delivery_code"}
|
||||
|
||||
{render_form_field field="chronopost_home_delivery_password"}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<b>{intl l="Allowed shipping modes" d='chronopost.home.delivery.bo.default'}</b>
|
||||
|
||||
{chronopostHomeDeliveryGetDeliveryTypesStatusKeys}
|
||||
{foreach from=$chronopostHomeDeliveryDeliveryTypesStatusKeys key=k item=statusKey}
|
||||
{render_form_field field={$statusKey}}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
@@ -0,0 +1,256 @@
|
||||
|
||||
{assign var="tab" value="configure"}
|
||||
{if isset($smarty.get.current_tab)}
|
||||
{assign var="tab" value=$smarty.get.current_tab}
|
||||
{/if}
|
||||
|
||||
{* default currency *}
|
||||
{loop type="currency" name="default_currency" default_only="1"}
|
||||
{$currencySymbol=$SYMBOL}
|
||||
{/loop}
|
||||
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<ul id="tabbed-menu" class="nav nav-tabs">
|
||||
|
||||
<li class="{if $tab eq "configure"}active{/if}"><a data-toggle="tab" href="#configure">{intl l="Advanced configuration" d='chronopost.home.delivery.bo.default'}</a></li>
|
||||
|
||||
{loop type="chronopost.home.delivery.delivery.mode" name="delivery_mode"}
|
||||
<li class="{if $tab eq "prices_slices_tab_{$ID}"}active{/if}"><a data-toggle="tab" href="#prices_slices_tab_{$ID}">{intl l="Price slices for \"%mode\"" d='chronopost.home.delivery.bo.default' mode={$TITLE}}</a></li>
|
||||
{/loop}
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div id="configure" class="tab-pane {if $tab eq "configure"}active{/if} form-container">
|
||||
{include file = "ChronopostHomeDelivery/ChronopostHomeDeliveryAdvancedConfig.html"}
|
||||
</div>
|
||||
|
||||
{loop type="chronopost.home.delivery.delivery.mode" name="delivery_mode"}
|
||||
{$deliveryModeId=$ID}
|
||||
<div id="prices_slices_tab_{$deliveryModeId}" class="tab-pane {if $tab eq "prices_slices_tab_$deliveryModeId" }active{/if} form-container">
|
||||
{if null !== $smarty.get.price_error && {$deliveryModeId} == $smarty.get.price_error_id}
|
||||
<div class="alert alert-danger" role="alert">{$smarty.get.price_error}</div>
|
||||
{/if}
|
||||
<br/>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- checkbox free shipping -->
|
||||
{assign var="isChronopostHomeDeliveryFreeShipping" value=0}
|
||||
{form name="chronopost.home.delivery.freeshipping.form"}
|
||||
<form action="{url path="/admin/module/chronopost-home-delivery/freeshipping"}" method="post" id="freeshippingform-{$deliveryModeId}">
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field="delivery_mode"}
|
||||
<input type="hidden" name="{$name}" value="{$deliveryModeId}">
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="freeshipping"}
|
||||
<label>
|
||||
{intl l="Activate total free shipping " d="chronopost.home.delivery.bo.default"}
|
||||
</label>
|
||||
|
||||
<div class="switch-small freeshipping-activation-ChronopostHomeDelivery" data-id="{$deliveryModeId}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" name="{$name}" value="true" {if $FREESHIPPING_ACTIVE}checked{assign var="isChronopostHomeDeliveryFreeShipping" value=1}{/if} />
|
||||
</div>
|
||||
{/form_field}
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6" id="freeshipping-from-{$deliveryModeId}" {if $isChronopostHomeDeliveryFreeShipping eq 1} style="display:none;" {/if}>
|
||||
<form action="{url path="/admin/module/chronopost-home-delivery/freeshipping_from"}" method="post">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon {if $FREESHIPPING_FROM}alert-success{/if}">{intl l="Or activate free shipping from (€) :" d="chronopost.home.delivery.bo.default"}</span>
|
||||
<input type="hidden" name="delivery-mode" value="{$deliveryModeId}">
|
||||
<input type="number" name="price" class="form-control" value="{$FREESHIPPING_FROM}">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">{intl l="Save"}</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{intl l="You can create price slices by specifying a maximum cart weight and/or a maximum cart price." d='socolissimo.bo.default'}
|
||||
{intl l="The slices are ordered by maximum cart weight then by maximum cart price." d='socolissimo.bo.default'}
|
||||
{intl l="If a cart matches multiple slices, it will take the last slice following that order." d='socolissimo.bo.default'}
|
||||
{intl l="If you don't specify a cart weight in a slice, it will have priority over the slices with weight." d='socolissimo.bo.default'}
|
||||
{intl l="If you don't specify a cart price in a slice, it will have priority over the other slices with the same weight." d='socolissimo.bo.default'}
|
||||
{intl l="If you specify both, the cart will require to have a lower weight AND a lower price in order to match the slice." d='socolissimo.bo.default'}
|
||||
</div>
|
||||
|
||||
<div class="slices" class="form-container">
|
||||
|
||||
{loop type="module" name="module-id-loop" code="ChronopostHomeDelivery"}
|
||||
{assign var="module_id" value=$ID}
|
||||
{/loop}
|
||||
{loop type="area" name="area_loop" module_id=$module_id backend_context=true}
|
||||
{$area_id=$ID}
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="clearfix">
|
||||
<small>{intl d='chronopost.home.delivery.bo.default' l="Area : "}</small> {$NAME}
|
||||
</label>
|
||||
</th>
|
||||
<th width="40%">
|
||||
<div id="area-freeshipping-{$area_id}" {if $isChronopostHomeDeliveryFreeShipping eq 1} style="display:none;" {/if}>
|
||||
<form action="{url path="/admin/module/chronopost-home-delivery/area_freeshipping"}" method="post">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon {if $area_id }alert-success{/if}">{intl l="Activate free shipping from (€) :" d="chronopost.home.delivery.bo.default"}</span>
|
||||
<input type="hidden" name="area-id" value="{$area_id}">
|
||||
<input type="hidden" name="delivery-mode" value="{$deliveryModeId}">
|
||||
|
||||
{ifloop rel="area_freeshipping"}
|
||||
{loop type="chronopost.home.delivery.area.freeshipping" name="area_freeshipping" area_id=$area_id delivery_mode_id=$deliveryModeId}
|
||||
<input type="number" step="0.01" name="cart-amount" class="form-control" value="{$CART_AMOUNT}">
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
{elseloop rel="area_freeshipping"}
|
||||
<input type="number" step="0.01" name="cart-amount" class="form-control" value="">
|
||||
{/elseloop}
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">{intl l="Save"}</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{intl l="Weight up to ... kg" d='chronopost.home.delivery.bo.default'}</th>
|
||||
<th class="col-md-3">{intl l="Untaxed Price up to ... %symbol" symbol=$currencySymbol d='chronopost.home.delivery.bo.default'}</th>
|
||||
<th class="col-md-5">{intl l="Price (%symbol)" symbol=$currencySymbol d='chronopost.home.delivery.bo.default'}</th>
|
||||
<th class="col-md-1">{intl l="Actions" d='chronopost.home.delivery.bo.default'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="chronopost.home.delivery" name="chronopost_home_delivery_area_$ID" area_id={$area_id} delivery_mode_id={$deliveryModeId} }
|
||||
<tr class="js-slice" data-area="{$area_id}" data-id="{$SLICE_ID}" data-delivmode="{$deliveryModeId}">
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="weight-max" class="form-control js-slice-weight-max" value="{$MAX_WEIGHT}" data-old="{$MAX_WEIGHT}" />
|
||||
</th>
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="price-max" class="form-control js-slice-price-max" value="{$MAX_PRICE}" data-old="{$MAX_PRICE}" />
|
||||
</th>
|
||||
<th class="col-md-5">
|
||||
<input type="text" data-field="price" class="form-control js-slice-price" value="{$PRICE}" data-old="{$PRICE}" />
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="customdelivery" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs js-slice-save" title="{intl d='chronopost.home.delivery.bo.default' l='Save this price slice'}">
|
||||
<span class="glyphicon glyphicon-floppy-disk"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="customdelivery" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs js-slice-delete" title="{intl d='chronopost.home.delivery.bo.default' l='Delete this price slice'}" data-id="{$ID}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{* New slice *}
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="chronopost" access="CREATE"}
|
||||
<tr class="js-slice-new" data-area="{$area_id}" data-id="0" data-delivmode="{$deliveryModeId}">
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="weight-max" class="form-control js-slice-weight-max" value="" />
|
||||
</th>
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="price-max" class="form-control js-slice-price-max" value="" />
|
||||
</th>
|
||||
<th class="col-md-5">
|
||||
<input type="text" data-field="price" class="form-control js-slice-price" value="" />
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
<a class="btn btn-default btn-xs js-slice-add" title="{intl d='chronopost.home.delivery.bo.default' l='Add this price slice'}" >
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
{elseloop rel="area_loop"}
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
{intl d='chronopost.home.delivery.bo.default' l="You should first attribute shipping zones to the modules: "}
|
||||
<a href="{url path="/admin/configuration/shipping_zones/update/$module_id"}">
|
||||
{intl d='chronopost.home.delivery.bo.default' l="manage shipping zones"}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{include
|
||||
file = "includes/generic-warning-dialog.html"
|
||||
|
||||
dialog_id = "chronopost_home_delivery_dialog"
|
||||
dialog_body = ""
|
||||
dialog_title = {intl d='chronopost.home.delivery.bo.default' l="Message"}
|
||||
}
|
||||
|
||||
{* JS Templates *}
|
||||
<script id="tpl-slice" type="text/html">
|
||||
<tr class="js-slice" data-area="<%=areaId %>" data-id="<%=id %>" data-delivmode="<%=deliveryModeId %>">
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="weight-max" class="form-control js-slice-weight-max" value="<%=weightMax %>" data-old="<%=weightMax %>" />
|
||||
</th>
|
||||
<th class="col-md-3">
|
||||
<input type="text" data-field="price-max" class="form-control js-slice-price-max" value="<%=priceMax %>" data-old="<%=priceMax %>" />
|
||||
</th>
|
||||
<th class="col-md-5">
|
||||
<input type="text" data-field="price" class="form-control js-slice-price" value="<%=price %>" data-old="<%=price %>" />
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="chronopost" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs js-slice-save" title="{intl d='chronopost.home.delivery.bo.default' l='Save this price slice'}">
|
||||
<span class="glyphicon glyphicon-floppy-disk"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="chronopost" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs js-slice-delete" title="{intl d='chronopost.home.delivery.bo.default' l='Delete this price slice'}" data-id="<%=id %>">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src='{$asset_url}'></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/libs/underscore-min.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var config = {
|
||||
'urlAdd': '{url path="/admin/module/chronopost-home-delivery/slice/save"}',
|
||||
'urlDelete': '{url path="/admin/module/chronopost-home-delivery/slice/delete"}',
|
||||
'urlSave': '{url path="/admin/module/chronopost-home-delivery/slice/save"}'
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Free shipping switch
|
||||
$(".freeshipping-activation-ChronopostHomeDelivery").bootstrapSwitch();
|
||||
|
||||
$(".freeshipping-activation-ChronopostHomeDelivery").on("switch-change", function(e, data){
|
||||
var is_checked = data.value;
|
||||
var mode = $(this).data("id");
|
||||
var form = $("#freeshippingform-"+mode);
|
||||
$('body').append('<div class="modal-backdrop fade in" id="loading-event"><div class="loading"></div></div>');
|
||||
$.ajax({
|
||||
url: form.attr('action'),
|
||||
type: form.attr('method'),
|
||||
data: form.serialize()
|
||||
}).done(function(){
|
||||
$("#loading-event").remove();
|
||||
})
|
||||
.success(function() {
|
||||
if (is_checked) {
|
||||
$('#config-btn-0').removeClass('disabled');
|
||||
$('#table-prices-chronopost-home-delivery-'+mode).hide('slow');
|
||||
$('#freeshipping-from-'+mode).hide('slow');
|
||||
} else {
|
||||
$('#config-btn-0').addClass('disabled');
|
||||
$('#table-prices-chronopost-home-delivery-'+mode).show('slow');
|
||||
$('#freeshipping-from-'+mode).show('slow');
|
||||
}
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown){
|
||||
$('#freeshipping-failed-body').html(jqXHR.responseJSON.error);
|
||||
$("#freeshipping-failed").modal("show");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Price slice
|
||||
|
||||
var tpl = _.template($("#tpl-slice").html());
|
||||
|
||||
var showMessage = function showMessage(message) {
|
||||
$('#chronopost_home_delivery_dialog')
|
||||
.find('.modal-body')
|
||||
.html(message)
|
||||
.end()
|
||||
.modal("show");
|
||||
};
|
||||
|
||||
var getSliceData = function getSliceData($slice) {
|
||||
var data = {
|
||||
id: $slice.data("id"),
|
||||
area: $slice.data("area"),
|
||||
deliveryModeId: $slice.data("delivmode"),
|
||||
price: $slice.find(".js-slice-price").first().val(),
|
||||
priceMax: $slice.find(".js-slice-price-max").first().val(),
|
||||
weightMax: $slice.find(".js-slice-weight-max").first().val()
|
||||
};
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
// add new slice
|
||||
$('.js-slice-add').on('click', function(){
|
||||
var $slice = $(this).parents('tr').first();
|
||||
var data = getSliceData($slice);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
url: config.urlAdd
|
||||
}).done(function(data, textStatus, jqXHR){
|
||||
var sliceHtml = '';
|
||||
if (data.success) {
|
||||
// reset form
|
||||
$slice.find('input').val('');
|
||||
// add slice
|
||||
sliceHtml = tpl(data.slice);
|
||||
|
||||
$(sliceHtml).insertBefore($slice);
|
||||
} else {
|
||||
showMessage(data.message.join('<br>'));
|
||||
}
|
||||
}).fail(function(jqXHR, textStatus, errorThrown){
|
||||
console.log(jqXHR);
|
||||
showMessage(jqXHR.responseText);
|
||||
});
|
||||
});
|
||||
|
||||
// save new slice
|
||||
$('.slices').on('click', '.js-slice-save', function(){
|
||||
var $slice = $(this).parents('tr').first();
|
||||
var data = getSliceData($slice);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
url: config.urlAdd
|
||||
}).done(function(data, textStatus, jqXHR){
|
||||
if (!data.success) {
|
||||
showMessage(data.message.join('<br>'));
|
||||
} else {
|
||||
var sliceHtml = tpl(data.slice);
|
||||
$(sliceHtml).insertBefore($slice);
|
||||
$slice.remove();
|
||||
// $slice.find('.js-slice-save').removeClass('btn-success');
|
||||
}
|
||||
}).fail(function(jqXHR, textStatus, errorThrown){
|
||||
console.log(jqXHR);
|
||||
showMessage(jqXHR.responseText);
|
||||
});
|
||||
});
|
||||
|
||||
$('.slices').on('change', '.js-slice input', function() {
|
||||
$(this).parents('tr').first().find('.js-slice-save').addClass('btn-success');
|
||||
});
|
||||
|
||||
// delete new slice
|
||||
$('.slices').on('click', '.js-slice-delete', function(){
|
||||
var $slice = $(this).parents('tr').first();
|
||||
var data = getSliceData($slice);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
url: config.urlDelete
|
||||
}).done(function(data, textStatus, jqXHR){
|
||||
var sliceHtml = '';
|
||||
if (data.success) {
|
||||
$slice.remove();
|
||||
} else {
|
||||
showMessage(data.message);
|
||||
}
|
||||
}).fail(function(jqXHR, textStatus, errorThrown){
|
||||
console.log(jqXHR);
|
||||
showMessage(jqXHR.responseText);
|
||||
});
|
||||
});
|
||||
|
||||
// add new slice
|
||||
$('.js-slice input').on('change', function(){
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,34 @@
|
||||
{extends file="email-layout.tpl"}
|
||||
|
||||
{* Do not provide a "Open in browser" link *}
|
||||
{block name="browser"}{/block}
|
||||
{* No pre-header *}
|
||||
{block name="pre-header"}{/block}
|
||||
|
||||
{* Subject *}
|
||||
{block name="email-subject"}{intl l="Your order confirmation Nº %ref" ref={$order_ref}}{/block}
|
||||
|
||||
{* Title *}
|
||||
{block name="email-title"}{/block}
|
||||
|
||||
{* Content *}
|
||||
{block name="email-content"}
|
||||
|
||||
{loop type="customer" name="customer.politesse" id={$customer_id} current="0"}
|
||||
{assign var="customerRef" value=$REF}
|
||||
|
||||
<p>{if {$TITLE} == 9}{intl l="Dear Mr. "}
|
||||
{else}{intl l="Dear Ms. "}
|
||||
{/if}
|
||||
{$FIRSTNAME} {$LASTNAME},
|
||||
</p>
|
||||
|
||||
{/loop}
|
||||
|
||||
<p>{intl l="We are pleased to inform you that your order number"} {$order_ref} {intl l="has been shipped on"} {format_date date=$update_date output="date"} {intl l="with the tracking number"} <strong>{$package}</strong>.</p>
|
||||
|
||||
<p>{intl l='<a href="https://www.chronopost.fr/tracking-no-cms/suivi-page?listeNumerosLT=%package">Click here</a> to track your shipment.' package=$package}</p>
|
||||
<p>{intl l='Thank you for your shopping with us and hope to see you soon on <a href="#">www.yourshop.com</a>'}</p>
|
||||
<p>{intl l="Your on-line store Manager"}<br/>
|
||||
{intl l="Your shop"}</p>
|
||||
{/block}
|
||||
@@ -0,0 +1 @@
|
||||
{intl l="Please display this message in HTML"}
|
||||
@@ -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}
|
||||
Reference in New Issue
Block a user