[-] BO : fixed bug #PSCFV-10096

This commit is contained in:
Vincent Augagneur
2013-08-13 16:14:09 +02:00
parent e8685b1430
commit 6e386868a6
2 changed files with 19 additions and 15 deletions
@@ -25,14 +25,11 @@
<script type="text/javascript">
var summary_translation_undefined = '{l s='[undefined]' js=1}';
var summary_translation_meta_informations = '{l s='This carrier is @s1 and the displayed delivery time is: @s2.' js=1}';
var summary_translation_meta_informations = '{l s='This carrier is @s1 and the delivery announced is: @s2.' js=1}';
var summary_translation_free = '<strong>{l s='free' js=1}</strong>';
var summary_translation_paid = '<strong>{l s='paid' js=1}</strong>';
var summary_translation_range = '{l s='This carrier can deliver orders from @s1 to @s2. If the order is out of range, the behavior is to @s3.' js=1}';
var summary_translation_shipping_cost = '{l s='The shipping cost is calculated @s1 and the tax rule @s2 is applied.' js=1}';
var summary_translation_paid = '<strong>{l s='not free' js=1}</strong>';
var summary_translation_range = '{l s='This carrier can deliver orders from @s1 to @s2. If the order is out of range, the behavior is to @s3.' js=1}';
var summary_translation_shipping_cost = '{l s='The shipping cost is calculated @s1 and the tax rule @s2 will be applied.' js=1}';
var summary_translation_price = '<strong>{l s='according to the price' js=1}</strong>';
var summary_translation_weight = '<strong>{l s='according to the weight' js=1}</strong>';
</script>
@@ -47,18 +44,18 @@
<div id="summary_range"></div>
<div class="clear">&nbsp;</div>
<div>
{l s='It will be displayed only for the following zones:'}
{l s='This carrier will be proposed for those delivery zones:'}
<ul id="summary_zones"></ul>
</div>
<div class="clear">&nbsp;</div>
<div>
{l s='It will be displayed only for the following groups:'}
{l s='And it will be proposed for thise client groups:'}
<ul id="summary_groups"></ul>
</div>
{if $is_multishop}
<div class="clear">&nbsp;</div>
<div>
{l s='It will be displayed only for the following shops:'}
{l s='Finally, this carrier will be proposed in those shops:'}
<ul id="summary_shops"></ul>
</div>
{/if}
+12 -5
View File
@@ -137,17 +137,24 @@ function displaySummary()
// Weight or price ranges
$('#summary_range').html(summary_translation_range);
if ($('input[name="shipping_method"]:checked').val() == 1)
unit = PS_WEIGHT_UNIT;
else
unit = currency_sign;
var range_inf = summary_translation_undefined;
var range_sup = summary_translation_undefined;
/*
$('input[name$="range_inf[]"]').each(function(){
/*
$('input[name$="range_inf[]"]').each(function(){
if (!isNaN(parseFloat($(this).val())) && (range_inf == summary_translation_undefined || range_inf < $(this).val()))
range_inf = $(this).val();
});
*/
range_inf = $('tr.range_inf td input:first').val();
range_sup = $('tr.range_sup td input:last').val();
range_inf = $('tr.range_inf td input:first').val()+' '+unit;
range_sup = $('tr.range_sup td input:last').val()+' '+unit;
$('input[name$="range_sup[]"]').each(function(){
if (!isNaN(parseFloat($(this).val())) && (range_sup == summary_translation_undefined || range_sup > $(this).val()))
@@ -187,7 +194,7 @@ function validateSteps(step_number)
var is_ok = true;
if ((multistore_enable && step_number == 3) || (!multistore_enable && step_number == 2))
{
if (!validateRange(2))
if ($('input[name="is_free"]').val() == 1 && !validateRange(2))
is_ok = false;
}