This tutorial will show you how to add custom link to the categories menu in Prestashop.
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.
4) Paste the code after the same <ul id=”cat”> tag in file tmcategories.tpl. It should be e.g.:
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.
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.
8) Copy the code for Subcategory from the Source code
9) Paste it in your new button code. Save the file and check the website.
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.
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