Fix selected category in left column

This commit is contained in:
Michael RICOIS 2017-11-28 13:00:33 +01:00
parent c50659be85
commit ce8ac77721

View File

@ -284,9 +284,14 @@ class PurchaseGuide extends Module
$id_category = $postModel->id_guide_category;
}
if($id_category == 0) {
$model = new GuideCategory();
$id_main_category = $id_child_category = 0;
}
else {
// Get selected categories
$model = new GuideCategory($id_category);
if ($model->id_parent === 0) {
if ($model->id_parent == 0) {
$id_main_category = $id_category;
$id_child_category = 0;
} else {
@ -294,6 +299,7 @@ class PurchaseGuide extends Module
$id_main_category = $mainCategory['id_guide_category'];
$id_child_category = $id_category;
}
}
$tree = $model->getTree($cookie->id_lang, $isEmployee);
$smarty->assign(array(