// Don't update some product attributes in group shop context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17069 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1647,6 +1647,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$object->setFieldsToUpdate((array)Tools::getValue('multishop_check'));
|
$object->setFieldsToUpdate((array)Tools::getValue('multishop_check'));
|
||||||
|
|
||||||
if ($object->update())
|
if ($object->update())
|
||||||
|
{
|
||||||
|
if (in_array($this->context->shop->getContext(), array(Shop::CONTEXT_SHOP, Shop::CONTEXT_ALL)))
|
||||||
{
|
{
|
||||||
if ($this->isTabSubmitted('Shipping'))
|
if ($this->isTabSubmitted('Shipping'))
|
||||||
$this->addCarriers();
|
$this->addCarriers();
|
||||||
@@ -1654,8 +1656,6 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->updateAccessories($object);
|
$this->updateAccessories($object);
|
||||||
if ($this->isTabSubmitted('Suppliers'))
|
if ($this->isTabSubmitted('Suppliers'))
|
||||||
$this->processSuppliers();
|
$this->processSuppliers();
|
||||||
if ($this->isTabSubmitted('Warehouses'))
|
|
||||||
$this->processWarehouses();
|
|
||||||
if ($this->isTabSubmitted('Features'))
|
if ($this->isTabSubmitted('Features'))
|
||||||
$this->processFeatures();
|
$this->processFeatures();
|
||||||
if ($this->isTabSubmitted('Combinations'))
|
if ($this->isTabSubmitted('Combinations'))
|
||||||
@@ -1677,7 +1677,10 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
|
|
||||||
if ($this->isProductFieldUpdated('category_box') && !$object->updateCategories(Tools::getValue('categoryBox'), true))
|
if ($this->isProductFieldUpdated('category_box') && !$object->updateCategories(Tools::getValue('categoryBox'), true))
|
||||||
$this->errors[] = Tools::displayError('An error occurred while linking object.').' <b>'.$this->table.'</b> '.Tools::displayError('To categories');
|
$this->errors[] = Tools::displayError('An error occurred while linking object.').' <b>'.$this->table.'</b> '.Tools::displayError('To categories');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->isTabSubmitted('Warehouses'))
|
||||||
|
$this->processWarehouses();
|
||||||
if (empty($this->errors))
|
if (empty($this->errors))
|
||||||
{
|
{
|
||||||
Hook::exec('actionProductUpdate', array('product' => $object));
|
Hook::exec('actionProductUpdate', array('product' => $object));
|
||||||
|
|||||||
Reference in New Issue
Block a user