Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Superfish Categories Box


Recommended Posts

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<?php // Start superfish categories box  ?>
  <script type="text/javascript" src="ext/jquery/superfish/js/jquery.hoverIntent.minified.js"></script>
  <script type="text/javascript" src="ext/jquery/superfish/js/superfish.js"></script>
  <script type="text/javascript" src="ext/jquery/superfish/js/supersubs.js"></script>
  <link rel="stylesheet" media="screen" href="ext/jquery/superfish/css/superfish.css" />
  <link rel="stylesheet" media="screen" href="ext/jquery/superfish/css/superfish-vertical.css">
  <script type="text/javascript">
    jQuery(document).ready(function(){
      jQuery('ul.sf-menu').superfish({
        animation: {height:'show'},   // slide-down effect without fade-in
        delay:     1200               // 1.2 second delay on mouseout
      });
    });
  </script>
<?php // End superfish categories box  ?>
<?php echo $oscTemplate->getBlocks('header_tags'); ?>
</head>
<body>

This is what that section of my template_top.php looks like.

Link to comment
Share on other sites

I do have theme switcher.  But Theme Switcher is calling for 1.5.1 in the file ht_theme_switcher.php

 

$jquery_version = '1.5.1';
if( MODULE_HEADER_TAGS_THEME_SWITCHER_JQUERY_VERSION != '' ) {
$jquery_version = MODULE_HEADER_TAGS_THEME_SWITCHER_JQUERY_VERSION;
}


$jquery_ui_version = '1.8.6';
if( MODULE_HEADER_TAGS_THEME_SWITCHER_THEME != '' ) {
$jquery_ui_version = MODULE_HEADER_TAGS_THEME_SWITCHER_JQUERY_UI_VERSION;
}


$theme_name = 'redmond';
if( MODULE_HEADER_TAGS_THEME_SWITCHER_THEME != '' ) {
Link to comment
Share on other sites

It doesn't matter what is in the file; that's only a default value to start with. You need to check your settings in your Admin >> Modules >> Header Tags >> Theme Switcher. That's where the actual values are stored.

 

Regards

Jim

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

Link to comment
Share on other sites

You did not install Theme Switcher correctly. You need to remove the lines in your template_top.php that call for jQuery, jQueryUI, and the theme. Those lines will look like this (but probably with a different version number)

<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.10.4.min.css" />
<script type="text/javascript" src="ext/jquery/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.10.4.min.js"></script>

If that does not solve the problem, you will need to install jQuery Migrate. You can get a copy from the jQuery site.

 

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...

In your PDF instructions you state this addon was done with 2.3.3 - will this work on a 2.3.1 store ?? are there any special instructions ?

I am running that right now, and have not gotten around to upgrading. I assume I would use this OR accordion box .. not both.

 

James

Link to comment
Share on other sites

It should work without any changes on any of the 2.3.x series. However, I suggest that you update to the latest version, as there are a number of security patches and bug fixes in the current code.

 

You could use this box and the accordion box and the stock categories box at the same time, but it doesn't make much sense to use more than one.

 

Regards

Jim

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

Link to comment
Share on other sites

Ok, i tried to do the install,

 

I am not a great programmer, so please be patient with me.

 

First, I did do some kind of theme change when I originally installed 2.3.1. This is the reason I think, I have a /catalog/admin/includes/application_top.php and /catalog/admin/includes/languages/english.php already in place rather then them being new files as you would suggest in your install instructions. (Any file I found I alsready had I renamed . old)

 

I put in everything.. it looks like it changed some of my theme colours, but otherwise did not break the store. I did name the files to .old so I could just reverse the above installs and return the store to normal.

 

Is there a way to find out what parts of these files are changed.. so I can make changes to my files for the superfish to work in my site?

 

James

Edited by James Schofield
Link to comment
Share on other sites

There is an error in the instructions. Your admin/includes/application_top.php and admin/includes/languages/english.php should be modified from the existing files. They are not new files. I'll fix the instructions.

 

All changes to existing files are marked with comments. See section 2.2.3 of the instructions for the details.

 

Thanks for the bug report.

 

Regards

Jim

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

Link to comment
Share on other sites

OK, I have been reading the thread, it would seem I have jquery 1.8.6 already installed, I am guesssing it is for the original theme changes I made.

 

SO from what I have read, I cannot run 2 versions of jQuery, so I need to update the theme code to use the 1.10 you have?? I looked up JQuery Migrate like you suggested, but I am not sure where to add the lines?

 

James

Edited by James Schofield
Link to comment
Share on other sites

I recommend using jQuery 1.10 or later for compatibility with Superfish. I have heard that jQuery 1.11 has issues with this, so I would stay with 1.10.3.

 

You can call jQuery Migrate with this line in includes/template_top.php, just after the call to jQuery:

  <script type="text/javascript" src="ext/jquery/jquery-migrate-1.2.1.min.js"></script>

Regards

Jim

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

Link to comment
Share on other sites

unfortunately for me, this conflicts with the addon I put in to change the theme, I dont know what addon that was anymore (yes I know bad me) and I am not adept enough to know what is changing to make this work. Guess I will have to wait on this.

 

James

Link to comment
Share on other sites

The only addon that I know of to change the theme is Theme Switcher. There is no conflict there; just enter the version numbers for your new jQuery and jQueryUI files in the Theme Switcher module setup.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 2 weeks later...

Working with a custom theme and needed the first level categories to not show the default jquery css.

 

So I changed /includes/modules/boxes/bm_categories_superfish.php from

              $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;

to

              $output .= '    <li class="sf-menu sf-vertical ui-corner-all">' . PHP_EOL;

and adjusted /ext/jquery/superfish/css/superfish.css to get the display the way I wanted it.

 

How does that look @@kymation ?

Edited by altoid

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

That would remove the default jQueryUI colors and the mouseover attributes. You can also remove ui-corner-all if you want the corners to be different.

 

Regards

Jim

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

Link to comment
Share on other sites

That would remove the default jQueryUI colors and the mouseover attributes. You can also remove ui-corner-all if you want the corners to be different.

 

Regards

Jim

 

OK, thanks for looking that over.  I'll take a look at how it appears with ui-corner-all gone as well.  Have a Merry Christmas.   :christmas_tree:

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

  • 1 month later...

It's for the regular osC 2.3 series. However, it only uses jQueryUI for styling the top-level categories, so it shouldn't take too much work to get it running with Bootstrap.

 

Regards

Jim

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

Link to comment
Share on other sites

I haven't tried this, so I could be completely wrong. First, check that the Superfish code is being loaded in the head section of the page. Look at your page source in Firefox, then look for anything in the top part of the page that says superfish. Click on those and look for 404 messages.

 

If that's all OK, I'll have to think about what else could go wrong.

 

Regards

Jim

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

Link to comment
Share on other sites

It is there in the source code as I see all the cats and subcats listed after this:

 

<div id="columnRight" class="col-md-2">

<!-- Superfish Categories Box BOF -->
<ul class="sf-menu">

 

I do not think I have newest copy of firefox and the icons on top nav bar are not showing correctly. I need to check that now as well, but I do not see any errors.

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...