[-] Carrier Wizard: fix

This commit is contained in:
PrestaEdit
2013-07-29 13:57:31 +02:00
parent 85553525e9
commit c1b0d32d32
3 changed files with 6 additions and 6 deletions
@@ -55,9 +55,11 @@
{l s='It will be displayed only for the following 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:'}
<ul id="summary_shops"></ul>
</div>
{/if}
</fieldset>
+1 -2
View File
@@ -1290,7 +1290,7 @@ class CarrierCore extends ObjectModel
public function setGroups($groups, $delete = true)
{
if ($delete)
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id_carrier);
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$this->id);
if (!count($groups))
return true;
$sql = 'INSERT INTO '._DB_PREFIX_.'carrier_group (id_carrier, id_group) VALUES ';
@@ -1300,4 +1300,3 @@ class CarrierCore extends ObjectModel
return Db::getInstance()->execute(rtrim($sql, ','));
}
}
@@ -532,7 +532,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$template->assign('fields_value', $fields_value);
$template->assign('input', array('type' => 'zone', 'name' => 'zones' ));
die ($template->fetch());
die($template->fetch());
}
public function ajaxProcessValidateStep()
@@ -544,7 +544,6 @@ class AdminCarrierWizardControllerCore extends AdminController
$this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
else
{
if (Shop::isFeatureActive() && $step_number == 2)
{
if (!Tools::getValue('checkBoxShopAsso_carrier'))
@@ -657,8 +656,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$return['errors'][] = Tools::displayError('You do not have permission to use this wizard.')
);
else
{
{
if ($id_carrier = Tools::getValue('id_carrier'))
{
$current_carrier = new Carrier((int)$id_carrier);
@@ -686,6 +684,7 @@ class AdminCarrierWizardControllerCore extends AdminController
$return['errors'][] = $this->l('An error occurred while saving this carrier.');
}
}
if (Validate::isLoadedObject($carrier))
{
if (!$this->changeGroups((int)$carrier->id))