Jump to content

Adding CMS links into the header menu


Recommended Posts

Hi,

 

Im trying to add few cms links into the header horizontal menu. At the moment all the links in the header are product categories, does anyone know which file to edit to add these links? Any help appreciated. Thanks in advance!

 

Edit: I am using Prestashop 1.4.9

Edited by blank_screen (see edit history)
Link to comment
Share on other sites

Good morning

If you already have the cms pages then go to:

Back office 》Modules 》Modules 》scroll down toTop Horizontal menu 》click configure 》you can then add/delete any thing on your menu.

Hope this helps, if not please reply

Sorry if it does not make sense as using Android to post this

 

Paul

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 3 months later...

I finally made it, thx guys for all the help

My friend i have the same problem i already search to all forums and i can not find solution. Please tell me the way you did it is very crusial for me. I suppose with your way you can add eccept cms link and any other  address you want... example suppliers.

Link to comment
Share on other sites

it's hard to say what you have to do because it isn't default module. I don't have it, i don't know how it works, and how the source code of this addon looks like.

i have the same problem. All the solutions i found concern a blocktopmenu folder in root prestashop folder. But there is no such folder. Furthermore there is no module concern top menu. It load imediately from categories. The site is this www.urbanfashion.gr . Have you got any idea or solution?

Link to comment
Share on other sites

we haven't got this module we don't know sources, how it works etc.

the best thing in my opinion: ask module developer, especially when the module is paid

they should provide some support then

Unfortunately they dont telling me .... i bought from templatemonster and they ask me money to tell me how to make the change.... :( im very disapoint.

I thing it is somewhere here in tmcategories.php but i dont know where

    if (!$this->isCached('tmcategories.tpl', $smartyCacheId))

        {

            $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');

            if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('

                SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite

                FROM `'._DB_PREFIX_.'category` c

                LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.')

                LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)

                WHERE (c.`active` = 1 OR c.`id_category` = 1)

                '.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'

                AND cg.`id_group` IN ('.pSQL($groups).')

                GROUP BY id_category

                ORDER BY `level_depth` ASC, c.`position` ASC')

            )

                return;

            $resultParents = array();

            $resultIds = array();

            foreach ($result as &$row)

            {

                $resultParents[$row['id_parent']][] = &$row;

                $resultIds[$row['id_category']] = &$row;

            }

            $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'));

            unset($resultParents);

            unset($resultIds);

            $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false);

            if (Tools::isSubmit('id_category'))

            {

                $cookie->last_visited_category = $id_category;

                $smarty->assign('currentCategoryId', $cookie->last_visited_category);

            }

            if (Tools::isSubmit('id_product'))

            {

                if (!isset($cookie->last_visited_category) OR !Product::idIsOnCategoryId($id_product, array('0' => array('id_category' => $cookie->last_visited_category))))

                {

                    $product = new Product($id_product);

                    if (isset($product) AND Validate::isLoadedObject($product))

                        $cookie->last_visited_category = (int)($product->id_category_default);

                }

                $smarty->assign('currentCategoryId', (int)($cookie->last_visited_category));

            }

            $smarty->assign('blockCategTree', $blockCategTree);

            if (file_exists(_PS_THEME_DIR_.'modules/tmcategories/tmcategories.tpl'))

                $smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/tmcategories/category-tree-branch.tpl');

            else

                $smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'tmcategories/category-tree-branch.tpl');

            $smarty->assign('isDhtml', $isDhtml);

        }

        $smarty->cache_lifetime = 31536000; // 1 Year

        $display = $this->display(__FILE__, 'tmcategories.tpl', $smartyCacheId);

        

        Tools::restoreCacheSettings();

        return $display;

Edited by gergos (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...