// 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:
mDeflotte
2012-01-24 08:28:24 +00:00
parent 82abad18ba
commit e9c14379af
3 changed files with 158 additions and 149 deletions
+1 -3
View File
@@ -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();