Post by orejuelajorge » Sun Aug 11, 2024 3:18 pm

A hug for everyone.
Could someone inform me what I should do to prevent OpenCart from hiding the top menu when I have no categories, or I don't have categories enabled. Since I use the top menu bar for custom links through the "Custom OpenCart header menu free" module.

I use OpenCart 3.0.3.9, with the original OpenCart theme.

I appreciate your help.
Last edited by orejuelajorge on Thu Oct 17, 2024 2:52 pm, edited 1 time in total.

Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by softmonke » Sun Aug 11, 2024 6:21 pm

orejuelajorge wrote:
Sun Aug 11, 2024 3:18 pm
A hug for everyone.
Could someone inform me what I should do to prevent OpenCart from hiding the top menu when I have no categories, or I don't have categories enabled. Since I use the top menu bar for custom links through the "Custom OpenCart header menu free" module.

I use OpenCart 3.0.3.9, with the original OpenCart theme.

I appreciate your help.
Just open up "menu.twig" located "catalog/view/theme/<your-theme>/template/common", and remove

Code: Select all

{% if categories %}
and

Code: Select all

{% endif %}
at the top and bottom of the template respectively.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by orejuelajorge » Mon Aug 12, 2024 2:56 am

Greetings Gentle Monster,
I have done the task and it did not work for me, if I disable all the categories, the top menu bar disappears. Could you share any other suggestions with me?

I attach an image. Thank you.

Attachments

img_1.jpg

img_1.jpg (163.85 KiB) Viewed 953 times


Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by softmonke » Mon Aug 12, 2024 12:40 pm

Hmm, it works fine on my end - tested on my own OpenCart installation.

Since you mentioned that you are using an extension that adds custom links to your header menu, can you try refreshing your modifications cache at Extensions » Modifications and see if the changes are applied?

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by orejuelajorge » Thu Aug 15, 2024 2:17 am

Greetings.
Unfortunately it doesn't work with all possible cache clears, including the browser. The menu appears just when I enable a category.
Last edited by orejuelajorge on Thu Aug 15, 2024 2:19 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by orejuelajorge » Thu Aug 15, 2024 2:18 am

Greetings.
Unfortunately it doesn't work with all possible cache clears, including the browser. The menu appears just when I enable a category.

Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by orejuelajorge » Thu Aug 15, 2024 3:06 am

I answer myself accepting my failure, :-[ unfortunately it is the module I use to add custom links, the Softmonke solution is correct, verified!
Now it's time to learn how to do it directly in the OpenCart code.

Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by orejuelajorge » Thu Aug 15, 2024 4:07 am

solved, just implement the same solution suggested by softmonke in the "tmdheader.twig" file of the commented extension, in the path catalog/view/theme/default/template/extension, commenting both the first line of the code and the last one. thanks a lot softmonke. ;)

Newbie

Posts

Joined
Sat Apr 05, 2014 5:34 am

Post by paulfeakins » Thu Aug 15, 2024 7:52 pm

orejuelajorge wrote:
Thu Aug 15, 2024 4:07 am
solved
Then please add [SOLVED] to the start of this post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: ianhaney50 and 17 guests