the-raven Posted January 28, 2019 Share Posted January 28, 2019 I was able to get this megamenu to work correctly using an older version of oscommerce (Frozen) which uses Bootstrap 3, but the current version (https://github.com/gburton/Responsive-osCommerce) is using Bootstrap 4 and seems to be creating problems with the layout because several of the tags are discontinued. I have tried removing and substituting tags, but I was still unable to get the mega menu to appear correctly on my local site. Any help would be appreciated. Example: tried replacing <li> tags with <div class="nav-item"> <a> to <a class="nav-link" ............> Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 28, 2019 Share Posted January 28, 2019 (edited) post a pic of what you have got so we can what the issue is. Bootstrap 4 will work with Mega menu, you can see an example here https://bootsnipp.com/snippets/orE6Z <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> <a class="navbar-brand" href="#">Mega Dropdown</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" href="#">Category</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Category 1 </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <div class="container"> <div class="row"> <div class="col-md-4"> <span class="text-uppercase text-white">Category 1</span> <ul class="nav flex-column"> <li class="nav-item"> <a class="nav-link active" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link item</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link item</a> </li> Edited January 28, 2019 by JcMagpie Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted March 24, 2019 Share Posted March 24, 2019 Does anyone have this working so the mega menu position is fixed to the top? For me, the menu itself works, but for reasons I don't yet understand, when I add the navbar-fixed-top to the css I loose the page scroll function so if the mega menu exceeds the screen height I can no longer scroll down the page....the scroll bar is present but if I remove navbar-fixed-top it allows me to scroll but the menu is not positioned where I would like. I'm wondering if it is something that is easy to fix or if I'm in for a world of hurt? Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted March 24, 2019 Share Posted March 24, 2019 I dont use Maga menu but I do have a sticky navbar on my test site. https://chilleddisplays.co.uk I first did this with css and ran into issues when it would not behave properly never did get tot the bottom of why! I ended up changing the class in the nav bar to this and it worked as you would expect with no issues. <nav class="navbar sticky-top <?php echo $navbar_style; ?> cm-navbar"> Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted March 24, 2019 Share Posted March 24, 2019 Could not get sticky to work 🙄 but made it work with css by adding #cm_header_megamenu{ position: fixed; z-index: 9999; } .yamm .dropdown-menu { left: auto; max-height:400px; overflow:scroll; so menu is fixed and drop down has scroll. It's on the test site, not sure if this is what you were after. Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted March 24, 2019 Share Posted March 24, 2019 1 hour ago, JcMagpie said: I dont use Maga menu but I do have a sticky navbar on my test site. https://chilleddisplays.co.uk I first did this with css and ran into issues when it would not behave properly never did get tot the bottom of why! I ended up changing the class in the nav bar to this and it worked as you would expect with no issues. <nav class="navbar sticky-top <?php echo $navbar_style; ?> cm-navbar"> I didn't try sticky-top...thanks for the idea, I'll give it a try. Playing around with it a bit more I realized that the z-index on nav-fixed-top was hiding the page scroll...it scrolls behind the menu...changing the z-index allowed me to see that. It looks like it is the menu itself that doesn't scroll using nav-fixed-top, not the page. I noticed in your second post that you set max-height to 400. Out of curiosity, what happens without that...will the menu still scroll? Okay I'm off to try sticky top. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Dan Cole Posted March 24, 2019 Share Posted March 24, 2019 Sticky seems to produce a much better result.....it is now close to working as I want. The only apparently problem at this point is that the sticky mega menu now scrolls off the top when I scroll down page and it reaches the boxes I have installed in the left column. At that point it looks like the box push the sticky mega menu off the top of the page as I scroll down. Seems a bit odd but hopefully I'll discover why. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted March 24, 2019 Share Posted March 24, 2019 1 hour ago, Dan Cole said: I noticed in your second post that you set max-height to 400. Out of curiosity, what happens without that...will the menu still scroll? Oh I did that just to keep all the drop downs a sensable size. Without is you can have some long and some short depending on whats in them. It will work fine with out that also. It's strange how when I installed mega menu on the test site Sticky-top did not work? I have it already set for the main Nav bar so It may have somthing to do with Mega menu also using the nav class, so perhaps it needs a new class for the second one? <nav class="navbar sticky-top nav2<?php echo $navbar_style; ?> cm-navbar"> This example shows it in a bit more detail. https://www.codeply.com/go/DpHESPqZsx Quote Link to comment Share on other sites More sharing options...
♥Dan Cole Posted March 24, 2019 Share Posted March 24, 2019 I think the sticky element might be the problem...what I read suggests that... Quote Sticky-positioned elements are only sticky within their parent element. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
freakystreak Posted June 13, 2019 Share Posted June 13, 2019 I've stalled this add-on onto a fresh OSC 2.3.4.1CE. All appears in the admin as expected but nothing shows on the front end. I've checked the page source and the HTML for the Mega Menu is there but no categories appear. I have checked the error logs and I'm getting this warning: count(): Parameter must be an array or an object that implements Countable in includes\classes\category_tree_megamenu.php on line 265 the line in question is: if (count($category_structure) > 0) { I'm assuming this is a PHP issue. I'm running this on a local WAMP server which is running 7.2.14. Can anyone help with what the correct code should be? Quote Ah, the world wide web. What a wonderful place. Link to comment Share on other sites More sharing options...
LeeFoster Posted August 6, 2019 Share Posted August 6, 2019 On 6/13/2019 at 3:45 PM, freakystreak said: I've stalled this add-on onto a fresh OSC 2.3.4.1CE. All appears in the admin as expected but nothing shows on the front end. I've checked the page source and the HTML for the Mega Menu is there but no categories appear. I have checked the error logs and I'm getting this warning: count(): Parameter must be an array or an object that implements Countable in includes\classes\category_tree_megamenu.php on line 265 the line in question is: if (count($category_structure) > 0) { I'm assuming this is a PHP issue. I'm running this on a local WAMP server which is running 7.2.14. Can anyone help with what the correct code should be? I'm having the same issue, did you ever fix it? Quote Link to comment Share on other sites More sharing options...
Omar_one Posted August 6, 2019 Share Posted August 6, 2019 @LeeFoster try to change this line if (count($category_structure) > 0) { to if (is_array($category_structure) && count($category_structure) > 0) { Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
LeeFoster Posted August 6, 2019 Share Posted August 6, 2019 8 minutes ago, Omar_one said: @LeeFoster try to change this line if (count($category_structure) > 0) { to if (is_array($category_structure) && count($category_structure) > 0) { I now get - Warning: sizeof(): Parameter must be an array or an object that implements Countable Quote Link to comment Share on other sites More sharing options...
Omar_one Posted August 6, 2019 Share Posted August 6, 2019 (edited) 9 minutes ago, LeeFoster said: I now get - Warning: sizeof(): Parameter must be an array or an object that implements Countable the line no.. or post the line Edited August 6, 2019 by Omar_one Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
♥raiwa Posted August 6, 2019 Share Posted August 6, 2019 if (isset($category_structure) && Try this Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
LeeFoster Posted August 6, 2019 Share Posted August 6, 2019 20 minutes ago, Omar_one said: the line no.. or post the line Warning: sizeof(): Parameter must be an array or an object that implements Countable in \includes\functions\general.phpon line225 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted August 6, 2019 Share Posted August 6, 2019 2 minutes ago, raiwa said: if (isset($category_structure) && Try this Still the Sizeof() error. Am I missing something though and the code that leads to $category_structure below refers to 'visibles' and that doesn't appear anywhere in my categories table. $category_structure_query_raw = " show columns from categories where field like '%visible%' Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted August 7, 2019 Share Posted August 7, 2019 @kymation Do you have any ideas? I suspect it's an issue with either BS4 or PHP 7.3 but don't know where to start. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted August 8, 2019 Author Share Posted August 8, 2019 It's going to be both. You will need to find all of the PHP issues caused by the move to 7.3, then upgrade from BS3 to BS4. The "%visible%" thing is a test for the presence of one of the hidden category mods. If it is found, the code will hide the categories as required, otherwise it will be ignored. That should not be an issue for you. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
LeeFoster Posted August 8, 2019 Share Posted August 8, 2019 3 hours ago, kymation said: It's going to be both. You will need to find all of the PHP issues caused by the move to 7.3, then upgrade from BS3 to BS4. I thought you might say that. What version of php was it written for? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted August 8, 2019 Author Share Posted August 8, 2019 It was written for the 5.x series, but with as many of the 7.x requirements as I knew about at the time. Not all of them, obviously. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
LeeFoster Posted August 8, 2019 Share Posted August 8, 2019 4 minutes ago, kymation said: It was written for the 5.x series, but with as many of the 7.x requirements as I knew about at the time. Not all of them, obviously. Regards Jim Thanks, gives me a starting point at least. Quote Link to comment Share on other sites More sharing options...
tomke Posted December 24, 2019 Share Posted December 24, 2019 OSCOM CE Phoenix v1.0.2.2 menue version base on megamenu - if someone is able to clear and upload as add-on ? also change new products to rand products https://pflanzen-tomke.de/ Quote Link to comment Share on other sites More sharing options...
cdetdi Posted January 21, 2020 Share Posted January 21, 2020 Jim - are there plans to bring this up to Phoenix? Willing to sponsor the development, let me know. alix32 1 Quote Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.