Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Superfish Categories Box


Recommended Posts

You need to look in the Head section of the page for the references to the Superfish Javascript and CSS files. Those are essential. Click on each one and see what you get.

 

If those are working, the rest should not be too hard to modify.

 

Regards

Jim

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

Link to comment
Share on other sites

Hurray! I uploaded new revised template_top and it is now working! I think I had something copied twice in there, my bad. It appears that the category text goes to a second line for some reason even though there is more space available in the left column, but it is working in general at least. I need some sleep now and will work more on it tomorrow. Thanks for your help Jim.

Edited by allaboutwicker
Link to comment
Share on other sites

That's that problem out of the way. Now to fix the text. Let me finish what I'm doing right now and I'll take a look at it. There are a couple of changes needed in the module file to make it work with Bootstrap and not jQueryUI. Shouldn't be a big job to fix.

 

Regards

Jim

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

Link to comment
Share on other sites

I've uploaded a new version to the usual location. There are now two packages -- the stock osCommerce 2.3.x version and the Bootstrap version.

 

The Bootstrap version has been rewritten to make for an easier install. You only need to upload the files and install. No file modifications. If you installed the old version on a Bootstrap site you'll have to revert the modified files to your backup (or stock osCommerce).

 

The new version also uses a new version of Superfish that is designed to work with Bootstrap. It doesn't need all of the hacks and code changes that the old jQueryUI version needed to make it compatible. It's a lot easier to work with.

 

Regards

Jim

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

Link to comment
Share on other sites

@@kymation I hope all is well... Just playing around with your brand new bootstrap version.... thank you very kindly! A couple issues;

 

Issue1 - see the attached thumbnail the below code in includes/modules/boxes/templates/superfish_categories

<?php if( strlen ( $title ) > 0 ) { ?>
      <div class="panel-heading">' . $title . '</div>' . PHP_EOL;
<?php } ?>

Is not pulling my English Title. Shouldn't this be something like?

<?php if( strlen ( $title ) > 0 ) {?>
      <div class="panel-heading"><?php echo $title; ?> </div>
<?php } ?>

Sorry.... I'm no "pro" I have clue what the . PHP_EOL; is used for.

 

Issue 2 -  (again see the thumbnail) the element panel-body seems to be missing... maybe something like below? Or was this intentional?

<div class="panel-body"><?php echo $formatted_data; ?></div>

Issue 3 - when in small view the subcats fly "right" off the screen. Is there an easy fix - maybe have them fly down in small views?

 

post-270094-0-01020100-1425326986_thumb.jpg

Link to comment
Share on other sites

@@greasemonkey

  1. Yes, you're right, I missed that line. That's a bug. I'll fix that and put up a new version. Thanks for reporting that.
  2. panel-body doesn't do much when it's enclosing a Superfish menu. The CSS for that element just adds some padding, and Superfish has its own padding, so I think it'll just squeeze the text down more. Add it if you like what it looks like on your site.
  3. Superfish is supposed to take care of that. I'll try to fix it if I have the time, but don't hold your breath.

Regards

Jim

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

Link to comment
Share on other sites

@@kymation thank you so much....

 

Superfish is supposed to take care of that. I'll try to fix it if I have the time, but don't hold your breath

I'm actually thinking to hide the category box completely when it gets to 991px because it gets kicked down to the bottom - and let the expanded category class tree I built for the navbar take over for navigation.

 

Although I'm not sure this is wise.... Just don't have much experience with this responsive stuff.

 

Thanks again Jim!

Link to comment
Share on other sites

@@kymation Hi Jim,

 

Excellent mod for the BS system - just what I was waiting for :)

 

One little question - is the new box missing some padding at the bottom to seperate it from any boxes below it?

 

Many Thanks for your work

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Yes, I think it needs some padding. And the title is messed up. I'll fix those and upload a patch.

 

Thanks for the bug report.

 

Regrds

Jim

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

Link to comment
Share on other sites

I've uploaded a new version to the usual location. This patch fixes the missing space at the bottom of the box and fixes my code errors in the title section.

 

If you need to upgrade, just drop the files on top. No need to uninstall/reinstall.

 

Regards

Jim

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

Link to comment
Share on other sites

I've uploaded a new version to the usual location. This patch fixes the missing space at the bottom of the box and fixes my code errors in the title section.

 

If you need to upgrade, just drop the files on top. No need to uninstall/reinstall.

 

Regards

Jim

 

Thanks Jim.  Any interest in turning this into a drop-down menu that could go into the header? (See Amazon, NewEgg etc.)

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

There's already one: http://addons.oscommerce.com/info/8977

 

That's not for Bootstrap, so it might take some fiddling. Try pointing it at the version of Superfish I included with this addon. That may be enough.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Hi Guys, I've installed this menu bar, and it works great thank you. I have a question though, I want to add a "Home" link to the menu bar, and I want it to be the first link at the top of the menu , before the categories appear - how can I do this?

Edited by dgoodwin20
Link to comment
Share on other sites

Find these lines in /includes/modules/boxes/bm_categories_superfish.php:

      private function format_data( $data_array, $pass = false ) {
        if( is_array( $data_array ) && count( $data_array ) > 0 ) {
          if( $pass == false ) {
            $output = '  <ul class="sf-menu">' . PHP_EOL;

and add this just after the above lines:

            $output .= '    <li class="sf-menu sf-vertical ui-state-default ui-corner-all" onmouseover="$(\'a#categories\').removeClass(\'ui-state-default\').addClass(\'ui-state-hover ui-state-focus\');" onmouseout="$(\'a#categories\').addClass(\'ui-state-default\').removeClass(\'ui-state-hover ui-state-focus\');">' . PHP_EOL;
            $output .= '      <a href="' . tep_href_link( FILENAME_DEFAULT ) . '">';
            $output .= HEADER_TITLE_CATALOG;
            $output .= '</a>' . PHP_EOL;

Not tested, so please report back if I fumbled the code somewhere.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi - Thanks for your response - It didn't work, but that was mainly due to my coding being all jumbled up due to me moving to a horizontal bar rather than a side bar - I've since used a different addon to get a better horizontal menu. Thanks again though, great addon just not what I wanted (side bar as opposed to a horizontal bar)

Link to comment
Share on other sites

  • 1 month later...

@@kymation

 

Hi.

 

This worked, but if we want to put behind category another link (for example contact us) how we can do it?

Can I ask ιν the wrong post but because the solution proposed above I did and worked with a small change ( <li class="First-level" ) I get the courage to ask for any ideas.
I use 2.3.4
Bootstrap.

Thanks in advance. (sorry for my english).

Link to comment
Share on other sites

Find this line in includes/modules/boxes/bm_categories_superfish.php:

        $output .= '    </ul>' . PHP_EOL;

Add just before that line:

        $output .= '      <li class="top_cat">' . '<a href="' . tep_href_link( FILENAME_CONTACT_US ) . '">' . MODULE_BOXES_CATEGORIES_SUPERFISH_CONTACT . '</a></li>' . PHP_EOL;

Then add to includes/languages/english/modules/boxes/bm_categories_superfish.php:

  define( 'MODULE_BOXES_CATEGORIES_SUPERFISH_CONTACT', 'Contact Us' );

Repeat that last line for each language, and translate the Contact Us part to that language.

 

Regards

Jim

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

Link to comment
Share on other sites

That doesn't look like the stock Superfish box. This only works for a Categories box in the left or right side column, not for one in the header.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 1 month later...

Hey there Jim.  I just installed your 1.2.1 BS addon version to a fresh install and it appears that either the file does not exist in the package or possibly there is a typo.

 

includes/modules/boxes/templates/categories_superfish_scripts.php  line 14:

 

  <script type="text/javascript" src="ext/jquery/superfish/js/jquery.hoverIntent.minified.js"></script>
 

Edited by marcello
Link to comment
Share on other sites

You're right, it's missing from the 2.3.4BS package. You can get the file from the 2.3.x Standard part of the package. I'll go fix that in the distribution.

 

Thanks for reporting this bug.

 

Regards

Jim

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...