Jump to content

Hide sub categories in top horizontal mega menu


Recommended Posts

Hi, I have a problem with mega menu.

How can I hide sub categories from mega menu? 

 

I would not use the css, because I think it's not an elegant solution.

Can you help me? 

Thanks in advice, Marco

Share this post


Link to post
Share on other sites

I solved!

In the php function "generateCategoriesMenu" in the ps_mainmenu.php file
I inserted a if:


if ($ category ['level_depth'] <= 2)

in doing so I exclude all the second level sub-categories.

Thanks for the support!

Share this post


Link to post
Share on other sites
  • 6 months later...
On 9/4/2018 at 10:50 AM, Marco said:

I solved!

In the php function "generateCategoriesMenu" in the ps_mainmenu.php file
I inserted a if:



if ($ category ['level_depth'] <= 2)

in doing so I exclude all the second level sub-categories.

Thanks for the support!

Could you please be more specific?

How do you fixed this?

Share this post


Link to post
Share on other sites
  • 10 months later...
On 3/25/2019 at 6:52 PM, demaluca said:

Could you please be more specific?

How do you fixed this?

Hello,

Maybe You are solved the problem? I'm add this line, and nothing happen...

I have a shopkart_lite theme.

Can anybody help me?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More