Merge pull request #601 from PrestaEdit/carrier_wizard2

[-] Carrier Wizard: fix
This commit is contained in:
Vincent Augagneur committed 2013-07-30 02:22:45 -07:00
commit 5929727be1
3 files changed
+4 -4

No files matched your search

@@ -55,9 +55,11 @@
{l s='It will be displayed only for the following groups:'} {l s='It will be displayed only for the following groups:'}
<ul id="summary_groups"></ul> <ul id="summary_groups"></ul>
</div> </div>
{if $is_multishop}
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<div> <div>
{l s='It will be displayed only for the following shops:'} {l s='It will be displayed only for the following shops:'}
<ul id="summary_shops"></ul> <ul id="summary_shops"></ul>
</div> </div>
{/if}
</fieldset> </fieldset>
-1
View File
@@ -1300,4 +1300,3 @@ class CarrierCore extends ObjectModel
return Db::getInstance()->execute(rtrim($sql, ',')); return Db::getInstance()->execute(rtrim($sql, ','));
} }
} }
@@ -533,7 +533,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$template->assign('fields_value', $fields_value); $template->assign('fields_value', $fields_value);
$template->assign('input', array('type' => 'zone', 'name' => 'zones' )); $template->assign('input', array('type' => 'zone', 'name' => 'zones' ));
die ($template->fetch()); die($template->fetch());
} }
public function ajaxProcessValidateStep() public function ajaxProcessValidateStep()
@@ -545,7 +545,6 @@ class AdminCarrierWizardControllerCore extends AdminController
$this->errors[] = Tools::displayError('You do not have permission to use this wizard.'); $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
else else
{ {
if (Shop::isFeatureActive() && $step_number == 2) if (Shop::isFeatureActive() && $step_number == 2)
{ {
if (!Tools::getValue('checkBoxShopAsso_carrier')) if (!Tools::getValue('checkBoxShopAsso_carrier'))
@@ -659,7 +658,6 @@ class AdminCarrierWizardControllerCore extends AdminController
); );
else else
{ {
if ($id_carrier = Tools::getValue('id_carrier')) if ($id_carrier = Tools::getValue('id_carrier'))
{ {
$current_carrier = new Carrier((int)$id_carrier); $current_carrier = new Carrier((int)$id_carrier);
@@ -687,6 +685,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$return['errors'][] = $this->l('An error occurred while saving this carrier.'); $return['errors'][] = $this->l('An error occurred while saving this carrier.');
} }
} }
if (Validate::isLoadedObject($carrier)) if (Validate::isLoadedObject($carrier))
{ {
if (!$this->changeGroups((int)$carrier->id)) if (!$this->changeGroups((int)$carrier->id))