// Carrier Wizard summary (just started)
This commit is contained in:
@@ -83,7 +83,57 @@ function onLeaveStepCallback(obj, context)
|
||||
|
||||
function displaySummary()
|
||||
{
|
||||
// Carrier name
|
||||
$('#summary_name').html($('#name').val());
|
||||
|
||||
// Delay and pricing
|
||||
$('#summary_meta_informations').html(summary_translation_meta_informations);
|
||||
if ($('#is_free_on').attr('checked'))
|
||||
$('#summary_meta_informations').html($('#summary_meta_informations').html().replace('@s1', summary_translation_free));
|
||||
else
|
||||
$('#summary_meta_informations').html($('#summary_meta_informations').html().replace('@s1', summary_translation_paid));
|
||||
$('#summary_meta_informations').html($('#summary_meta_informations').html().replace('@s2', $('#delay_1').val()));
|
||||
|
||||
// Tax and calculation mode for the shipping cost
|
||||
$('#summary_shipping_cost').html(summary_translation_shipping_cost);
|
||||
if ($('#billing_price').attr('checked'))
|
||||
$('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', summary_translation_price));
|
||||
else if ($('#billing_weight').attr('checked'))
|
||||
$('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', summary_translation_weight));
|
||||
else
|
||||
$('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', '<strong>' + summary_translation_undefined + '</strong>'));
|
||||
$('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s2', '<strong>' + $('#id_tax_rules_group option:selected').text() + '</strong>'));
|
||||
|
||||
// Weight or price ranges
|
||||
$('#summary_range').html(summary_translation_range);
|
||||
var range_inf, range_sup;
|
||||
range_inf = summary_translation_undefined;
|
||||
range_sup = summary_translation_undefined;
|
||||
$('input[name$="range_inf[]"]').each(function(){
|
||||
if (!isNaN(parseFloat($(this).val())) && (range_inf == summary_translation_undefined || range_inf < $(this).val()))
|
||||
range_inf = $(this).val();
|
||||
});
|
||||
$('input[name$="range_sup[]"]').each(function(){
|
||||
if (!isNaN(parseFloat($(this).val())) && (range_sup == summary_translation_undefined || range_sup > $(this).val()))
|
||||
range_sup = $(this).val();
|
||||
});
|
||||
$('#summary_range').html($('#summary_range').html().replace('@s1', '<strong>' + range_inf + '</strong>'));
|
||||
$('#summary_range').html($('#summary_range').html().replace('@s2', '<strong>' + range_sup + '</strong>'));
|
||||
$('#summary_range').html($('#summary_range').html().replace('@s3', '<strong>' + $('#range_behavior option:selected').text().toLowerCase() + '</strong>'));
|
||||
|
||||
// Delivery zones
|
||||
$('#summary_zones').html('');
|
||||
$('.input_zone').each(function(){
|
||||
if ($(this).attr('checked'))
|
||||
$('#summary_zones').html($('#summary_zones').html() + '<li><strong>' + $(this).parent().prev().text() + '</strong></li>');
|
||||
});
|
||||
|
||||
// Group restrictions
|
||||
$('#summary_groups').html('');
|
||||
$('input[name$="groupBox[]"]').each(function(){
|
||||
if ($(this).attr('checked'))
|
||||
$('#summary_groups').html($('#summary_groups').html() + '<li><strong>' + $(this).parent().next().next().text() + '</strong></li>');
|
||||
});
|
||||
}
|
||||
|
||||
function validateSteps(step_number)
|
||||
|
||||
Reference in New Issue
Block a user