SEO Post no774

Read Our SEO POST:

PrestaShop mega menu not working (add rows)

Learn how to SEO your Website!

Tips & Tricks about Content, Local or Technical SEO optimization for every website

Don't miss it! Read my WordPress SEO post and discover tips & tricks on "How to optimize my website". Specific code optimization techniques for Pagespeed or GTmetrix reports, to speed up your WordPress and help you reach the top organic rankinks, at the first page of Google results.

Photo of post: PrestaShop mega menu not working (add rows)

PrestaShop mega menu not working (add rows)

You have a PrestaShop TM Mega Menu plugin, and you are probably reading this post because you are facing problems with your top menu, whether on mobile or desktop version. The most common issues are the following:

a. You cannot create a new link or a sub-menu, because TM mega menu module is not adding rows, or

b. You can’t update your existing drop-down menu, or

c. Your PrestaShop module is not working on mobile, and you cannot modify your current top menu on your header, or

d. You want to edit your PrestaShop TM Mega Menu module (tmmegamenu), and you realize, that your sub-menus get disappeared, every time you edit a row.

2-steps solution to repair the error of your mega menu and override bugs

The technical seo mega menu quick solution, which is possibly the fix for your problem, is to integrate the JavaScript file named back.js inside your header.tpl. Instead of calling the specific .js file directly from your Mega Menu module, actually through tmmegamenu.tpl file, try to include it just above the ending </head> tag.

Step.1
In other words, locate the tmmegamenu.php file of the module. You will find it under /httpdocs/modules/tmmegamenu. Before doing anything, you are recommended to create a backup of your e-shop, saving both filesystem and DB for future reference, in case needed. Next, set as comment the following line in tmmegamenu.php , as written hereafter:

 //$this->context->controller->addJS($this->_path.'views/js/back.js');

Step.2
Next, locate the header.tpl file normally under admin/yourtheme/default/template/header.tpl . At the end of the head section, add the following line, before the </head> HTML tag:

<script type="text/javascript" src="../modules/tmmegamenu/views/js/back.js"></script>

 

The header.tpl file is a part of PrestaShop themes and modules. It defines the HTML structure and layout for the header section in the PrestaShop Back Office or Front Office.

Important notes, depending on your PrestaShop version and setup.

You can locate this file in one of the following locations:

1. Default Back Office Header

If it pertains to the Back Office (admin panel), the header.tpl file is often part of the Back Office theme files:

Path: /admin/themes/default/template/header.tpl

2. Default Front Office Header

If it is part of the Front Office (shop interface for customers), the file resides in the active theme directory:

Path: /themes/<your-theme-name>/header.tpl .

Replace <your-theme-name> with the name of your current theme.

3. Module-Specific Header

Some modules might override or include their custom header.tpl files to modify the header for specific pages:

Path: /modules/<module-name>/views/templates/front/header.tpl .

Replace <module-name> with the specific module’s directory name.

How to Locate the PrestaShop Files you need, to Fix TM Mega Menu

If you cannot find the file in the above locations, you can:

Search the PrestaShop Files: Use a file search tool to look for header.tpl.
Override System: Check if your theme or module has overridden the core template by looking in override folders:
/override/controllers/admin/
/override/controllers/front/

Photo credit for the current technical SEO post: Photo by freepik

Related tags:
Back to SEO Blog

Jan 2025
This website is releted to the term: Search Engine Optimizion (SEO), or otherwise known as Digital Marketing, in English (USA, Great Britain, Ireland, Australia) or Greek!

Photo credit Image by Pixabay

Guest Posting on: Digital Marketing, from SEO experts...

... Any published article or post on SEO is valid. You can follow any posted recommendations to fix your code in order to get a better score on GTmetrix or PageSpeed Insights. Whenever I find time, I continue developing my website.

Also, if you have a new SEO technique or want to publish a fantastic new SEO strategy online that converts into leads or sales, especially in the e-commerce space, please contact me and I will host your (strictly relative) article, with all proper credits to the author, for at least one month.

Moreover, I will be especially happy if I receive from you an email related to search engine optimization in Greek, which is my native language. Of course, I can provide you with any help you need and it concerns SEO in Greek or creating websites, since I have developed the Wordpress theme that you literally read from scratch. If you are an SEO specialist in Greece, share your opinion with me! So do not hesitate to contact me, I am waiting for you for any advice, question or suggestion to improve my site or anything related to SEO in Greece.

My message in Greek
Θα χαρώ ιδιαιτέρως, αν λάβω από εσάς email σχετικό με search engine optimization στα Ελληνικά, τα οποία αποτελούν τη μητρική μου Γλώσσα. Φυσικά, μπορώ να σας παράξω οποιαδήποτε βοήθεια χρειαστείτε και αφορά SEO στα Ελληνικά ή δημιουργία ιστοσελίδων, μιας και έχω αναπτύξει το Wordpress theme που διαβάζετε κυριολεκτικά από το μηδέν. Αν είστε SEO specialists στην Ελλάδα, μοιραστείτε την άποψή σας μαζί μου! Μην διστάσετε, λοιπόν, να επικοινωνήσετε, σας περιμένω για οποιαδήποτε συμβουλή, απορία ή πρόταση για βελτίωση του site μου ή οτιδήποτε σχετικά με SEO στην Ελλάδα.

SEO Implementations on Websites that I helped to get a better Google Ranking

These are a few websites on which I performed SEO (Search Engine Optimization) and of course, they now get traffic from the first page of Google results.