Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Categories Accordion Box for 2.3.1


kymation

Recommended Posts

Yes, and that has side effects, including what you noticed. If you don't like that, I suggest that you use the original version that has been tested and works as intended.

 

Sorry, but I can't make custom versions for everyone who wants something slightly different.

 

Regards

Jim

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

Link to comment
Share on other sites

Hello,

I just installed this module today and it really looks great..although i'm not sure it's functioning properly..when you click on a category heading it opens up to the sub categories like its supposed to..but it also redirects to the page for that main category and the accordion will not close..please help

Link to comment
Share on other sites

That sounds like it is working as intended. Does it look like the screenshots on the first page of this thread?

 

Regards

Jim

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

Link to comment
Share on other sites

This forum's image linking is broken. Click on the link, then delete the [/img at the end of the URL.

 

Regards

Jim

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

Link to comment
Share on other sites

No, they're not supposed to close until another category is opened. What action would be tied to closing a category? I suppose you could go back to the front page of the store, but that seems like a waste of bandwidth, and I doubt it's what the customer would expect.

 

Regards

Jim

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

Link to comment
Share on other sites

there is an example of your add on in one of the posts in this thread..www.racingmedia.de..when you click on one of the categories on this site the accordion box opens and when clicked again it closes..it doesn't navigate from the home page till you click on a sub category..is this a separate modification to your add on?

Link to comment
Share on other sites

Yes, if you read back a page or two you can find the discussion of the changes. That change also introduces its own problems, so test it before you decide to use it on a live site.

 

Regards

Jim

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

Link to comment
Share on other sites

i can't seem to find the code changes that stratula made to have his accordion boxes function that way..i would really like it to function like this on my site..i have all the latest jquery files and i'm running a 2.3.3 oscommerce build..

Link to comment
Share on other sites

This is the only change i could find:

 

comment out these lines

$categories_string .= ' onclick="location.href=\'';

$categories_string .= tep_href_link( FILENAME_DEFAULT, $cPath_new );

$categories_string .= '\';"';

 

this kind of works..but my sub categories are no longer shown

Link to comment
Share on other sites

That's it. The subcategories will show in the box but not on the page. That's the intended behavior, and that is the code being used on the page you referenced, so far as I can tell. If you really want something different, then you will have to be more specific about what you want.

 

Regards

Jim

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

Link to comment
Share on other sites

the subcategories do not show in the box..i click on the main categories and they give me a blank drop down..i want the home page to stay static while the accordion boxes act dynamically..i want the main categories to open and close when clicked on..i don't want to navigate away from the home page until a sub category is clicked on..just like it works on racingmedia.de

Link to comment
Share on other sites

He's apparently made some other change to get the subcategories to show. Unfortunately I don't have time right now to make this special version work for you. Feel free to experiment with it yourself, or use a different categories box.

 

Regards

Jim

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

Link to comment
Share on other sites

got it..got that to work for the most part..the only problem i'm having now is that the categories drop down the whole length of the page..the drop down doesn't just end after the last sub category..is this constraint in the stylesheet?

Link to comment
Share on other sites

That should not happen. You may have changed something in the code to cause that. Does this code in the module file match yours:

 

    $categories_string .= '  <script type="text/javascript">' . PHP_EOL;
    $categories_string .= '    $(function() {' . PHP_EOL;
    $categories_string .= '	  $( "#categoriesMenu" ).accordion({' . PHP_EOL;
    $categories_string .= '	    autoHeight: false,' . PHP_EOL;
    $categories_string .= '	    collapsible: true,' . PHP_EOL;
    $categories_string .= '	    icons: {' . PHP_EOL;
    $categories_string .= "		  'header': 'ui-icon-" . MODULE_BOXES_CATEGORIES_ACCORDION_ICON . "'," . PHP_EOL;
    $categories_string .= "		  'headerSelected': 'ui-icon-" . MODULE_BOXES_CATEGORIES_ACCORDION_ICON_SELECTED . "'" . PHP_EOL;
    $categories_string .= '	    },' . PHP_EOL;
    $categories_string .= '	    active: ' . $category_active_id . PHP_EOL;
    $categories_string .= '	  });' . PHP_EOL;
    $categories_string .= '    });' . PHP_EOL;
    $categories_string .= '  </script>' . PHP_EOL;

 

Regards

Jim

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

Link to comment
Share on other sites

  • 2 months later...

What this addon can make it the best is if a flyout menu could be added to subcategories.

 

I am not a programmer otherwise i would definetely assist in adding it.

 

But i have read it can be done with the jquery $("#menu").menu(); function.

 

Here is the code of how to do it but i know programming so kymation could be kind enough to add it would be great.

 

<head>
   <meta charset="utf-8" />
   <title>jQuery UI Accordion - Default functionality</title>
   <link rel="stylesheet"
   href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
   <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
   <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
   <link rel="stylesheet" href="/resources/demos/style.css" />
   <script>
    $(function() {
	    $("#menu").menu();
	    $("#accordion").accordion();
    });
   </script>
</head>
<body>
   <div id="accordion">
	 <h3>Section 1</h3>
    <div>
	    <ul id="menu">
		    <li class="ui-state-disabled"><a href="#">Aberdeen</a>
		    </li>
		    <li><a href="#">Ada</a>
		    </li>
		    <li><a href="#">Adamsville</a>
		    </li>
		    <li><a href="#">Addyston</a>
		    </li>
		    <li> <a href="#">Delphi</a>
			    <ul>
				    <li class="ui-state-disabled"><a href="#">Ada</a>
				    </li>
				    <li><a href="#">Saarland</a>
				    </li>
				    <li><a href="#">Salzburg</a>
				    </li>
			    </ul>
		    </li>
		    <li><a href="#">Saarland</a>
		    </li>
		    <li> <a href="#">Salzburg</a>
			    <ul>
				    <li> <a href="#">Delphi</a>
					    <ul>
						    <li><a href="#">Ada</a>
						    </li>
						    <li><a href="#">Saarland</a>
						    </li>
						    <li><a href="#">Salzburg</a>
						    </li>
					    </ul>
				    </li>
				    <li> <a href="#">Delphi</a>
					    <ul>
						    <li><a href="#">Ada</a>
						    </li>
						    <li><a href="#">Saarland</a>
						    </li>
						    <li><a href="#">Salzburg</a>
						    </li>
					    </ul>
				    </li>
				    <li><a href="#">Perch</a>
				    </li>
			    </ul>
		    </li>
		    <li class="ui-state-disabled"><a href="#">Amesville</a>
		    </li>
	    </ul>
    </div>
	 <h3>Section 2</h3>
    <div>
	    <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
		    purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
		    velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit
		    faucibus urna.</p>
    </div>
   </div>
</body>

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