Jump to content

Recommended Posts

Hello,

 

I have already spent several hours trying to duplicate Top horizontal menu, coming with default Prestashop new template.

 

I changed the followings:

folder name: blocktopmenu2

tpl name: blocktopmenu2.tpl

php name:blocktopmenu2.php

php file code:

  • class blocktopmenu2 extends Module
  • $this->name = 'blocktopmenu2';
  • return $this->display(__FILE__, 'blocktopmenu2.tpl');

But when I go to BO/modules an empy page is loaded. After removing blocktopmenu2 folder, BO/modules is displayed properly

 

I want to make 2 different menus with different items, can anybody please tell, what parts of this module need to be modified in order to duplicate it and retain full functionality?

 

Thank you

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 2 weeks later...

I was able to duplicate this module. the steps i took is below.

 

i went into the

 

 

I changed the followings:
folder name: blocktopmenu2
tpl name: blocktopmenu2.tpl
php name:blocktopmenu2.php

php name:menutoplinks2.class
php file code:

 

in blocktopmenu2.php i did the following:

- search all "menutoplinks" and replace with "menutoplinks2"

- change "class blocktopmenu extends Module" to "class blocktopmenu2 extends Module"

- search and change all  "blocktopmenu.tpl" to "blocktopmenu2.tpl"

- search and chage all "MOD_BLOCKTOPMENU_ITEMS" to "MOD_BLOCKTOPMENU_ITEMS2"

- search and change all "MOD_BLOCKTOPMENU_SEARCH to "MOD_BLOCKTOPMENU_SEARCH2"

- search and replace all "linksmenutop" to "linksmenutop2"

- search and replace all "linksmenutop_lang" to "linksmenutop2_lang"

 

in menutoplinks2.class change:

- search and replace all "linksmenutop" to "linksmenutop2"

- search and replace all "linksmenutop_lang" to "linksmenutop2_lang"

- "class MenuTopLinks2" to "class MenuTopLinks2"

 

And finally if you have a theme, yo need to go into ../themes/theme_name/module and make a copy of the "blocktopmenu" folder and rename it "blocktopmenu2"

 

and i also had to go into ../themes/theme_name/css/module and make a copy of the "blocktopmenu" folder and rename it "blocktopmenu2"

Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...

vishnuo it doesn't work! I did everything and in fact I have two menus in backoffice but this is the same menu! when you change something you can see same result in second menu.. and in front office you can see one menu only!

 

So waste of ime! or maybe someone know how to do ti? :)

Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...
×
×
  • Create New...