// Removing products of root-categories
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12628 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -312,14 +312,12 @@ class CategoryCore extends ObjectModel
|
||||
$product = new Product((int)$p['id_product']);
|
||||
if (Validate::isLoadedObject($product))
|
||||
{
|
||||
if ($this->remove_products)
|
||||
if ($this->remove_products || $this->id_parent == 0)
|
||||
$product->delete();
|
||||
else
|
||||
{
|
||||
if ($this->disable_products)
|
||||
{
|
||||
$product->active = 0;
|
||||
}
|
||||
|
||||
$product->addToCategories($this->id_parent);
|
||||
$product->save();
|
||||
|
||||
Reference in New Issue
Block a user