updated category tree input field name

This commit is contained in:
Shreesh Arora
2024-10-01 12:40:39 +05:30
parent 72e4a2de54
commit 7f034b259d
2 changed files with 2 additions and 7 deletions

View File

@@ -720,13 +720,11 @@ class AdminCategoriesControllerCore extends AdminController
public function processAdd()
{
$id_category = (int)Tools::getValue('id_category');
$id_parent = (int)Tools::getValue('categoryBox');
$id_parent = (int)Tools::getValue('id_parent');
// if true, we are in a root category creation
if (!$id_parent) {
$_POST['is_root_category'] = $_POST['level_depth'] = 1;
$_POST['id_parent'] = $id_parent = (int)Configuration::get('PS_ROOT_CATEGORY');
} else {
$_POST['id_parent'] = $id_parent;
}
if ($id_category) {
@@ -759,7 +757,6 @@ class AdminCategoriesControllerCore extends AdminController
// @todo remove this after adding link_rewrite form option
// currently have removed link_rewrite as it is currently not required
// so adding link_rewrite in $_POST
$_POST['id_parent'] = $id_parent = (int)Tools::getValue('categoryBox');
if (!Validate::isLoadedObject($this->object)) {
foreach (Language::getLanguages(true) as $lang) {
$_POST['link_rewrite_'.$lang['id_lang']] = Tools::link_rewrite(Tools::getValue('name_'.$lang['id_lang']));