13372 - add PLV and PLV_ALL categories
This commit is contained in:
parent
582faf57d1
commit
72e8320cc8
@ -7,6 +7,8 @@ class Category extends CategoryCore
|
||||
const CATEGORY_COLLECTION_ALL = 8;
|
||||
const CATEGORY_SAVEUR = 12;
|
||||
const CATEGORY_SAVEUR_ALL = 27;
|
||||
const CATEGORY_PLV = 71;
|
||||
const CATEGORY_PLV_ALL = 72;
|
||||
|
||||
public static function getCategoriesTree($id_parent, $currentDepth = 0, $depth = 3, $context = null)
|
||||
{
|
||||
|
@ -23,6 +23,10 @@ class CategoryController extends CategoryControllerCore
|
||||
{
|
||||
Tools::redirect($this->context->link->getCategoryLink(Category::CATEGORY_SAVEUR_ALL));
|
||||
}
|
||||
elseif ($this->category->id == Category::CATEGORY_PLV)
|
||||
{
|
||||
Tools::redirect($this->context->link->getCategoryLink(Category::CATEGORY_PLV_ALL));
|
||||
}
|
||||
|
||||
$this->category->hasBanner = file_exists(_PS_CAT_IMG_DIR_ . 'banners/' . $this->category->id_category . '.jpg');
|
||||
parent::initContent();
|
||||
@ -34,7 +38,7 @@ class CategoryController extends CategoryControllerCore
|
||||
$families = Category::getCategoriesTree(Category::CATEGORY_HOME, 0, 3);
|
||||
|
||||
// Si on est sur une catégorie enfant direct des familles
|
||||
if(in_array($this->category->id_parent, array(Category::CATEGORY_COLLECTION, Category::CATEGORY_SAVEUR))) {
|
||||
if(in_array($this->category->id_parent, array(Category::CATEGORY_COLLECTION, Category::CATEGORY_SAVEUR, Category::CATEGORY_PLV))) {
|
||||
$categoriesTree = Category::getCategoriesTree($this->category->id_parent, 0, 2);
|
||||
$children = Category::getCategoriesTree($this->category->id_category, 0, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user