[-] BO: Delete specific price after combination deletion && fix SpecificPrice::getByProductId() sql query
This commit is contained in:
@@ -102,7 +102,14 @@ class CombinationCore extends ObjectModel
|
||||
|
||||
// Removes the product from StockAvailable, for the current shop
|
||||
StockAvailable::removeProductFromStockAvailable((int)$this->id_product, (int)$this->id);
|
||||
|
||||
|
||||
if ($specific_prices = SpecificPrice::getByProductId((int)$this->id_product, (int)$this->id))
|
||||
foreach ($specific_prices as $specific_price)
|
||||
{
|
||||
$price = new SpecificPrice((int)$specific_price['id_specific_price']);
|
||||
$price->delete();
|
||||
}
|
||||
|
||||
if (!$this->hasMultishopEntries() && !$this->deleteAssociations())
|
||||
return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user