Skip to content

Commit

Permalink
[-] BO: PSCFV-7685 parent category for root categories after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rGaillard committed Apr 10, 2013
1 parent 17012ea commit f43aee9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/admin/AdminCategoriesController.php
Expand Up @@ -542,9 +542,14 @@ public function processAdd()
{
$id_category = (int)Tools::getValue('id_category');
$id_parent = (int)Tools::getValue('id_parent');

// if true, we are in a root category creation
if (!$id_parent && !Tools::isSubmit('is_root_category'))
$_POST['is_root_category'] = $_POST['level_depth'] = $_POST['id_parent'] = $id_parent = 1;
{
$_POST['is_root_category'] = $_POST['level_depth'] = 1;
$_POST['id_parent'] = $id_parent = (int)Configuration::get('PS_ROOT_CATEGORY');
}

if ($id_category)
{
if ($id_category != $id_parent)
Expand Down

1 comment on commit f43aee9

@tripats
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just made a short test and finally and seems to work. Thank you ;)

Please sign in to comment.