diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl
index 3212627c1..19c77ecf5 100644
--- a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl
+++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl
@@ -26,13 +26,14 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
diff --git a/controllers/admin/AdminCarrierWizardController.php b/controllers/admin/AdminCarrierWizardController.php
index e22f1c8e9..81dc8d576 100644
--- a/controllers/admin/AdminCarrierWizardController.php
+++ b/controllers/admin/AdminCarrierWizardController.php
@@ -97,6 +97,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$carrier = new Carrier();
$this->tpl_view_vars = array(
+ 'enableAllSteps' => (int)Validate::isLoadedObject($carrier),
'wizard_steps' => $this->wizard_steps,
'validate_url' => $this->context->link->getAdminLink('AdminCarrierWizard'),
'wizard_contents' => array(
diff --git a/js/admin_carrier_wizard.js b/js/admin_carrier_wizard.js
index 4dd3c7a94..b376e0c55 100644
--- a/js/admin_carrier_wizard.js
+++ b/js/admin_carrier_wizard.js
@@ -39,7 +39,8 @@ function initCarrierWizard()
'onShowStep' : onShowStepCallback,
'onLeaveStep' : onLeaveStepCallback,
'onFinish' : onFinishCallback,
- 'transitionEffect' : 'slideleft'
+ 'transitionEffect' : 'slideleft',
+ 'enableAllSteps' : enableAllSteps
});
}
@@ -83,32 +84,34 @@ function onLeaveStepCallback(obj, context)
function displaySummary()
{
+ // used as buffer - you must not replace directly in the translation vars
+ var tmp;
+
// Carrier name
$('#summary_name').html($('#name').val());
// Delay and pricing
- $('#summary_meta_informations').html(summary_translation_meta_informations);
+ tmp = summary_translation_meta_informations.replace('@s2', $('#delay_1').val());
if ($('#is_free_on').attr('checked'))
- $('#summary_meta_informations').html($('#summary_meta_informations').html().replace('@s1', summary_translation_free));
+ tmp = tmp.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()));
+ tmp = tmp.replace('@s1', summary_translation_paid);
+ $('#summary_meta_informations').html(tmp);
// Tax and calculation mode for the shipping cost
- $('#summary_shipping_cost').html(summary_translation_shipping_cost);
+ tmp = summary_translation_shipping_cost.replace('@s2', '' + $('#id_tax_rules_group option:selected').text() + '');
if ($('#billing_price').attr('checked'))
- $('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', summary_translation_price));
+ tmp = tmp.replace('@s1', summary_translation_price);
else if ($('#billing_weight').attr('checked'))
- $('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', summary_translation_weight));
+ tmp = tmp.replace('@s1', summary_translation_weight);
else
- $('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s1', '' + summary_translation_undefined + ''));
- $('#summary_shipping_cost').html($('#summary_shipping_cost').html().replace('@s2', '' + $('#id_tax_rules_group option:selected').text() + ''));
+ tmp = tmp.replace('@s1', '' + summary_translation_undefined + '');
+ $('#summary_shipping_cost').html(tmp);
// 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;
+ var range_inf = summary_translation_undefined;
+ var 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();
@@ -117,9 +120,12 @@ function displaySummary()
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', '' + range_inf + ''));
- $('#summary_range').html($('#summary_range').html().replace('@s2', '' + range_sup + ''));
- $('#summary_range').html($('#summary_range').html().replace('@s3', '' + $('#range_behavior option:selected').text().toLowerCase() + ''));
+ $('#summary_range').html(
+ $('#summary_range').html()
+ .replace('@s1', '' + range_inf + '')
+ .replace('@s2', '' + range_sup + '')
+ .replace('@s3', '' + $('#range_behavior option:selected').text().toLowerCase() + '')
+ );
// Delivery zones
$('#summary_zones').html('');