// Fixed #PSTEST-643
This commit is contained in:
+12
-1
@@ -658,7 +658,8 @@ class ProductCore extends ObjectModel
|
|||||||
!$this->deleteSceneProducts() ||
|
!$this->deleteSceneProducts() ||
|
||||||
!$this->deleteSearchIndexes() ||
|
!$this->deleteSearchIndexes() ||
|
||||||
!$this->deleteAccessories() ||
|
!$this->deleteAccessories() ||
|
||||||
!$this->deleteFromAccessories())
|
!$this->deleteFromAccessories() ||
|
||||||
|
!$this->deleteFromSupplier())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ($id = ProductDownload::getIdFromIdProduct($this->id))
|
if ($id = ProductDownload::getIdFromIdProduct($this->id))
|
||||||
@@ -680,6 +681,16 @@ class ProductCore extends ObjectModel
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteFromSupplier()
|
||||||
|
{
|
||||||
|
$return = Db::getInstance()->execute(
|
||||||
|
'DELETE FROM `'._DB_PREFIX_.'product_supplier`
|
||||||
|
WHERE `id_product` = '.(int)$this->id
|
||||||
|
);
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addToCategories add this product to the category/ies if not exists.
|
* addToCategories add this product to the category/ies if not exists.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -392,8 +392,11 @@ class AdminSuppliersControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$address = new Address($obj->id_address);
|
$address = new Address($obj->id_address);
|
||||||
$address->deleted = 1;
|
if (Validate::isLoadedObject($address))
|
||||||
$address->save();
|
{
|
||||||
|
$address->deleted = 1;
|
||||||
|
$address->save();
|
||||||
|
}
|
||||||
return parent::postProcess();
|
return parent::postProcess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user