// Fixed warehouses/carriers associations - #PI-134
This commit is contained in:
@@ -538,18 +538,6 @@ class AdminWarehousesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
// if updating
|
||||
if ($obj->id > 0)
|
||||
{
|
||||
// handles shops associations
|
||||
if (Tools::isSubmit('ids_shops'))
|
||||
$obj->setShops(Tools::getValue('ids_shops'));
|
||||
|
||||
// handles carriers associations
|
||||
if (Tools::isSubmit('ids_carriers'))
|
||||
$obj->setCarriers(Tools::getValue('ids_carriers'));
|
||||
}
|
||||
|
||||
// hack for enable the possibility to update a warehouse without recreate new id
|
||||
$this->deleted = false;
|
||||
|
||||
@@ -588,6 +576,25 @@ class AdminWarehousesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AdminController::processUpdate();
|
||||
*/
|
||||
public function processUpdate()
|
||||
{
|
||||
if (!($obj = $this->loadObject(true)))
|
||||
return;
|
||||
|
||||
// handles shops associations
|
||||
if (Tools::isSubmit('ids_shops'))
|
||||
$obj->setShops(Tools::getValue('ids_shops'));
|
||||
|
||||
// handles carriers associations
|
||||
$obj->setCarriers(Tools::getValue('ids_carriers'), array());
|
||||
|
||||
|
||||
return parent::processUpdate();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AdminController::initProcess()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user