// Removing products of root-categories

This commit is contained in:
mDeflotte
2012-01-24 08:28:24 +00:00
parent 715fbd2c88
commit 39d8479a8e
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();