// categories multishop improvements (BO breadcrumb + category tree root removed)

This commit is contained in:
vChabot
2012-01-23 14:50:47 +00:00
parent 7cbaf711be
commit 1e8d84fd0d
3 changed files with 23 additions and 15 deletions
+12 -9
View File
@@ -164,11 +164,11 @@ class HelperCore
'search' => $this->l('Find a category')
);
$top_category = Category::getTopCategory();
$root_category = Category::getRootCategory();
$disabled_categories[] = $top_category->id;
if (!$root)
{
$root_category = Category::getRootCategory();
$root = array('name' => $root_category->name, 'id_category' => $root_category->id);
}
if (!$use_radio)
$input_name = $input_name.'[]';
@@ -243,15 +243,18 @@ class HelperCore
}
}
$root_input = ' ';
if ($root_category->id != $top_category->id)
$root_input = '<input type="'.(!$use_radio ? 'checkbox' : 'radio').'" name="'
.$input_name.'" value="'.$root['id_category'].'" '
.($home_is_selected ? 'checked' : '').' onclick="clickOnCategoryBox($(this));" />
<span class="category_label">'
.$root['name'].
'</span>';
$html .= '
<ul id="categories-treeview" class="filetree">
<li id="'.$root['id_category'].'" class="hasChildren">
<span class="folder">
<input type="'.(!$use_radio ? 'checkbox' : 'radio').'" name="'
.$input_name.'" value="'.$root['id_category'].'" '
.($home_is_selected ? 'checked' : '').' onclick="clickOnCategoryBox($(this));" /> '
.$root['name']
.'</span>
<span class="folder">'.$root_input.' </span>
<ul>
<li><span class="placeholder">&nbsp;</span></li>
</ul>