Jump to content

Navigacia - podkategorie


dusonav

Recommended Posts

ahoj, viete niekto nahodou ako schovam v top horizontal menu podkategorie? ked zkažem na produkty zobrazi mi napr

( Drevenne dekoracie a ešte čo obsahuje ta kategoria.)

 

potrebujem aby som tam mal len tie hlavne kategorie nie aj podkategorie. dakujem

 

vid foto. potrebujem tam mat len to textilna galantéria bez tych podkategorií 1CIF.JPG

Link to comment
Share on other sites

  • 2 months later...

Ahoj, predpokaldam ze pouzivas PS 1.6.x.x

 

Budes musiet upravit subor ktory najdes v modules/blocktopmenu/blocktopmenu.php

 

Priblizne na 615 riadku najdes kod ktory vyzera takto:

 

if (isset($category['children']) && !empty($category['children'])){
    $html .= '<ul>';
    $html .= $this->generateCategoriesMenu($category['children'], 1);


    if ((int)$category['level_depth'] > 1 && !$is_children)
    {
        $files = scandir(_PS_CAT_IMG_DIR_);


        if (count($files) > 0)
        {
            $html .= '<li class="category-thumbnail">';


            foreach ($files as $file)
                if (preg_match('/^'.$category['id_category'].'-([0-9])?_thumb.jpg/i', $file) === 1)
                    $html .= '<div><img src="'.$this->context->link->getMediaLink(_THEME_CAT_DIR_.$file)
                    .'" alt="'.Tools::SafeOutput($category['name']).'" title="'
                    .Tools::SafeOutput($category['name']).'" class="imgm" /></div>';


            $html .= '</li>';
        }
    }


    $html .= '</ul>';
}

 

 
Zaciatok kodu treba upravit z:
 

if (isset($category['children']) && !empty($category['children']))

 

 
na zobrazovanie levelov subkategorii, napriklad:

 

if ($category['level_depth'] < 1 && isset($category['children']) && !empty($category['children'])){

 

 

 

Kde to cislo 1 udava pocet zobrazovanych  subkategorii. Pred upravami si zalohuj original subor v pripade problemov.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...