Jump to content
dusonav

Navigacia - podkategorie

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More