Jump to content
Latest News: (loading..)

Recommended Posts

Posted (edited)

This Addon adds a horizontal menu bar in the header of every store page. This menu bar contains the names of each of your top-level categories. When a customer clicks on a category name, a Megamenu expands below the menu bar. This Megamenu contains a category image and name for each of the top-level category's subcategories, or the top-level category image and name and a list of links to the products in that category if there are no subcategories.

The Addon code is available here.

 

category_with_subcategories.jpg

category_without_subcategories.jpg

admin_panel.jpg

Edited by kymation
Added link to Addon.

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
5 hours ago, KADILO said:

error.jpg

the sort order is missing from your configuration, probably you need to add the field into your product listing first for it to be available as sort option under mega menu.


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites
Posted (edited)

It's better to use the sort order, but this Addon is supposed to tolerate it being missing. Apparently I fumbled the code for that.

Try changing the code in includes/classes/category_tree_megamenu, line 279, from this:

    $result = '';

to this:

    $result = 'pd.products_name';

I'll update the Addon in a bit.

Regards

Jim

Edited by kymation
Found the error.

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I've updated the Addon to include this fix. Thanks to @KADILO for reporting the bug.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

You have an error somewhere. Check your error log and post the error message so I can find the problem.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

l56

include_once 'includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__);

hth


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

LOST: One mind. Lightly used; sentimental value only. Reward for any information leading to its recovery.

Thanks @burt for pointing that out. I've uploaded a fixed copy to the usual place.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

There is no practical way to create a Megamenu on a screen that size. Users with small devices should use the standard Hamburger menu as it will work on small screens.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim, many thanks for this! 

I'm still testing and understanding it. On a BS EDGE (August 2017) it throw an error regarding FILENAME_DEFAULT. As you know, all those DEFINE_ETC has disappeared in the latest versions. The fix is simple, change it for 'index.php' in every instance. For the convenience of users, here you are that file modified. It seems to work for me.

category_tree_megamenu.php


Shopowner, not coder, experienced copypaster  :D

Share this post


Link to post
Share on other sites
Posted (edited)

Maybe, if I can understand what that means. Do you want to limit the number of subcategories that are shown?

Regards

Jim

Edited by kymation
Spelling

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

@TITO4  Sorry, I thought I had replied to you. Thanks very much for reporting the bug, and for giving me the fix. I've been very busy, but I'll add your code to my master and release it as soon as I get a chance.

Again, my apologies for ignoring you.

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Don't worry at all. In fact, I'm flattered for your consideration. I understand that we are all in similar circumstances.


Shopowner, not coder, experienced copypaster  :D

Share this post


Link to post
Share on other sites
On 4/17/2018 at 8:57 PM, kymation said:

Maybe, if I can understand what that means. Do you want to limit the number of subcategories that are shown?

Regards

Jim

No, I want limit the row of the subcategories in madule option just like "products oer column"

Untitled-1.jpg

Share this post


Link to post
Share on other sites

You can't limit the number of rows because the code doesn't know how many rows there are going to be. It should be possible to limit the number of subcategories, and that would have the same effect. That would require changes to the code, which I don't have time to do right now, so for now the answer is no.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thank you :biggrin:

Also is there a possibility to give a auto mobile style menu in place of megamenu when the viewport is scrolled down?

6 minutes ago, kymation said:

Older Addons like this one will need the Compatibility Addon to work with newer versions of Edge.

Regards

Jim

 

 

Share this post


Link to post
Share on other sites

It may be possible to do that, but I don't know how.

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi, thanks for the addon, I'm currently testing it and wanted to know, if there are no child in the category shouldn't it move you to that category instead of showing you the category below?

 

thanks!

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

×