Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change top level of superfish horizontal menu


ccbangler

Recommended Posts

I'm trying to edit the superfish horizontal menu so that the top level are:

Products | some link | some other link | etc

 

I just want the Products to be filled with categories.

 

I just cant get the menu to write out properly to work with the menu, and I know I can't be the first one to want to use it this way! I tried searching with no luck in the forums.

 

Any help would be great thanks!

Link to comment
Share on other sites

There is a Superfish menu in the Header Footer Contents Addon. I also have some modules for that addon that do the same thing. I'll give you the modules if you want to go that route. Either way should give you a working horizontal menu.

 

Regards

Jim

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

Link to comment
Share on other sites

I assume you are using this contribution: http://addons.oscommerce.com/info/7541

 

if so find this:

// Close off nested lists
   for ($nest = 0; $nest <= $GLOBALS['this_level']; $nest++) {
    $output .= '</ul>'; 
 }

 

change to this:

// Close off nested lists
   for ($nest = 1; $nest <= $GLOBALS['this_level']; $nest++) {

    //close subcategory
    $output .= '</ul></li>';

    //extra links
    $output .='	 
	  <li><a href=" '.tep_href_link('reviews.php', '', 'NONSSL').'" >Reviews</a></li>
	  <li><a href=" '.tep_href_link('articles.php/acne-t-2', '', 'NONSSL').'" >Learn More</a></li>
	  <li><a href=" '.tep_href_link('faq.php', '', 'NONSSL').'" >Faqs</a></li>	 
	  ';

    // close list
    $output .='</ul>'; 
 }

 

you can see this example live at www dot niora dot com

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 1 year later...

Thank you, this helped a lot, I would never have caught you have to change to $nest = 1 instead of $nest = 0

 

Slight change I had to make adding the class name to make it display the same as the others and not off to the side

 

    for ($nest = 1; $nest <= $GLOBALS['this_level']; $nest++) {
 
//if you need extra links uncomment out the lines below
$output .= '</ul></li>';
$output .=' 
<li class="current_0"><a href="products_new.php" class="current sf-with-ul">NEW</a></li>
<li class="current_0"><a href="specials.php" class="current sf-with-ul">Sale</a></li>
';
 
        $output .= '</ul>';
Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

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