Sunday, December 1, 2013

How to add custom links to categories menu in prestashop

This tutorial will show you how to add custom link to the categories menu in Prestashop.


Prestashop_How_to_add_custom_links_to_categories_menu_01


1) Open the file modules/tmcategories/tmcategories.tpl on your server.


2) Go to your website and click on “View page source” (ctrl+U hotkey)


3) Find the code for your categories list. Select and copy the code for one menu item. It should start after the <ul id=”cat”> tag.


Prestashop_How_to_add_custom_links_to_categories_menu_02


4) Paste the code after the same <ul id=”cat”> tag in file tmcategories.tpl. It should be e.g.:








1



<li><a href="http://your_website/category.php?id_category=1">Mobile phones</a></li>




Prestashop_How_to_add_custom_links_to_categories_menu_03


5) Edit the link and button title.


You may copy this code and add it after foreach cycle if you wish to have the last additional custom menu button as well. You may add target=”_blank” to open your link in a new browser tab.


Prestashop_How_to_add_custom_links_to_categories_menu_04


6) Save the file and check your website.


7) You may add a drop-down menu to your new custom button as you can see it in “Mobile phones” category.


Prestashop_How_to_add_custom_links_to_categories_menu_05


8) Copy the code for Subcategory from the Source code


Prestashop_How_to_add_custom_links_to_categories_menu_06


9) Paste it in your new button code. Save the file and check the website.


Prestashop_How_to_add_custom_links_to_categories_menu_07


The main disadvantage of this feature is that you can add a custom button before or after you categories menu only. Let us try to create a new button inside your categories menu.


10) First of all, you need to get rid of this cycle and paste custom links for your categories manually instead.


Prestashop_How_to_add_custom_links_to_categories_menu_08


Prestashop_How_to_add_custom_links_to_categories_menu_09


Now, you can add a custom link inside your categories menu between the categories.



How to add custom links to categories menu in prestashop

No comments:

Post a Comment