// Fixed carrier wizard behavior after validation
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
var labelDelete = '{l s="Delete" js=1}';
|
||||
var labelValidate = '{l s="Validate" js=1}';
|
||||
var validate_url = '{$validate_url|addslashes}';
|
||||
var carrierlist_url = '{$carrierlist_url|addslashes}';
|
||||
var nbr_steps = {$wizard_steps.steps|count};
|
||||
var enableAllSteps = {if $enableAllSteps|intval == 1}true{else}false{/if};
|
||||
</script>
|
||||
|
||||
@@ -100,6 +100,7 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
'enableAllSteps' => (int)Validate::isLoadedObject($carrier),
|
||||
'wizard_steps' => $this->wizard_steps,
|
||||
'validate_url' => $this->context->link->getAdminLink('AdminCarrierWizard'),
|
||||
'carrierlist_url' => $this->context->link->getAdminLink('AdminCarriers').'&conf='.((int)Validate::isLoadedObject($carrier) ? 4 : 3),
|
||||
'wizard_contents' => array(
|
||||
'contents' => array(
|
||||
0 => $this->renderStepOne($carrier),
|
||||
|
||||
@@ -166,31 +166,6 @@ class AdminCarriersControllerCore extends AdminController
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
$this->displayInformation(
|
||||
' <b>'.$this->l('How do I create a new carrier?').'</b>
|
||||
<br />
|
||||
<ul>
|
||||
<li>'.$this->l('Click "Add New."').'<br /></li>
|
||||
<li>'.$this->l('Fill in the fields and click "Save."').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '.
|
||||
$this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').'
|
||||
</li>
|
||||
<li>'.$this->l('Click "Add New."').'</li>
|
||||
<li>'.
|
||||
$this->l('Select the name of the carrier before defining the price or weight range.').' '.
|
||||
$this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').'
|
||||
</li>
|
||||
<li>'.$this->l('When you\'re done, click "Save."').'</li>
|
||||
<li>'.$this->l('Click on the "Shipping" menu.').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set the fees that will be applied for this carrier.').' '.
|
||||
$this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').'
|
||||
</li>
|
||||
<li>'.$this->l('For each zone, enter a price and then click "Save."').'</li>
|
||||
<li>'.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'</li>
|
||||
</ul>'
|
||||
);
|
||||
$this->_select = 'b.*';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier'.Shop::addSqlRestrictionOnLang('b').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'carrier_tax_rules_group_shop` ctrgs ON (a.`id_carrier` = ctrgs.`id_carrier`
|
||||
|
||||
@@ -69,7 +69,7 @@ function onFinishCallback(obj, context)
|
||||
resizeWizard();
|
||||
}
|
||||
else
|
||||
alert('YEAAAAAAH !!!');
|
||||
window.location.href = carrierlist_url;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user