// check fields before change products statuse

This commit is contained in:
Rémi Gaillard
2013-03-12 12:28:40 +01:00
parent 5907d4b8d7
commit 32e9c7ff4f
@@ -1735,6 +1735,19 @@ class AdminProductsControllerCore extends AdminController
return false;
}
public function processStatus()
{
$this->loadObject(true);
if (!Validate::isLoadedObject($this->object))
return false;
if (($error = $this->object->validateFields(false, true)) !== true)
$this->errors[] = $error;
if (($error = $this->object->validateFieldsLang(false, true)) !== true)
$this->errors[] = $error;
return !count($this->errors) ? parent::processStatus() : false;
}
public function processUpdate()
{
$this->checkProduct();