Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Categories Accordion Box for 2.3.1


kymation

Recommended Posts

This addon provides a Categories box styled with the jQuery UI Accordion controls. Top-level categories are Section headers and subcategories are links inside the Content panels. The box works the same way the stock osCommerce box does, the difference is only in styling.

 

Code is now available here.

 

Regards

Jim

Edited by kymation

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

Link to comment
Share on other sites

I got a problem on this mod. When i first tryed it (replaced the original menu) it was locking fine. But when i click on a category it turns back to the original. The most of my products is in the head cat. I only got one cat whit sub-cats. When i click that the meny turns to something who looks like bad css from the 90s... i dont know whats wrong and i dont get any errors exepct bad looking.

 

Im from sweden (as seen on my english) and have swedish lang installed. Can this generate problems?

 

here are som pics of how its looks for me. i cant show online example bacouse server is on my local computer for testing for now.

 

This is how it looks when i visit the page after erasing everything that the site stores whit the browser.

as you can se it works now.

f56201164221Pf248.jpg

 

BUT... when i click on any cat link it all goes wrong. When i click a cat link whit no subs i get this.

As you can se i clicked the cat "Kjolar" and the meny looks like original:

fa6201164634P5cc7.jpg

 

Ok.. but what happens if i click a link whit sub cats in it. ohh noo.. now the whole code is messed up...

816201164744P7cf1.jpg

 

If i copy the link to the page when the sub is open and then delete cache and eveything like it i get this:

a46201164924Pe3e8.jpg

 

can someone give me a hint of what is happening? i have the latest jQuery (updated when i edited some colors whit themeroller.

I wun XAMPP under win7 if it matters.

 

EDIT: When i looked in the apache error log file i saw that the server denied acces to some of the dirs. And im using a virtual host for this so i just added som directory codes and now it seems to work.

 

Is there any way to make categorys whit no suvb cat to just show whitout expanding?

Edited by sdstransport
Link to comment
Share on other sites

There must be a Content box for every Accordion header, so the box will always expand. If all of your products are in the top-level categories, or at least some of your categories have no subs, this may not be the best Addon for you. There are probably other ways to get this effect.

 

Regards

Jim

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

Link to comment
Share on other sites

Thx for fast reply. I have no ide how jQuery works so maybee i have to wait for a update to this mod? i thought i had it working for while now... but i was wrong... i go back to the original and wait for update on this. But im stil glad that someone did this mod. it looks nice when it works!

Link to comment
Share on other sites

I have no idea why yours isn't working, so I can't help you fix it. Even if I do, it still won't allow you to have categories that don't expand.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim, I have this installed on a "in progress" 2.3.1 shop. I believe it's operating as intended; i.e. the boxes expand accordion style show sub categories. As well, when a category is selected the background color changes as does the category title text color.

 

All's good I think; I only have two levels (catetory>subcategory) at this point for a couple main categories, but the third category just goes to products, still that looks fine.

 

I have the "sunny" themeroller installed so the category boxes background title area picked up the "orange" color. However the balance of the boxes title background in the shop are gray. Perhaps that's how it's supposed to work by design, so I am only mentioning that here for an observation.

 

I am still in the newbie stage, but I presume if I choose another themeroller theme, the category accordion boxes will change along with the rest of the stores theme.

 

Anyway, so far so good, as I add some more categories and products I will keep an eye on that.

 

Thanks

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

The box should change along with the rest if you change the theme. The colors used are those of the Accordion box on the ThemeRoller site, or you can use the ThemeRoller bookmarklet to restyle on your site.

 

Here's what a stock store looks like with the Sunny theme:

 

accordion_4.jpg

 

Regards

Jim

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

Link to comment
Share on other sites

The box should change along with the rest if you change the theme. The colors used are those of the Accordion box on the ThemeRoller site, or you can use the ThemeRoller bookmarklet to restyle on your site.

 

Here's what a stock store looks like with the Sunny theme:

 

Regards

Jim

 

That's it. Thanks for the verification. I appreciate you providing this add on for 2.3.1, its a nice design touch.

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

You can have two, but you will need to rename all of the constants in the second module, and change the CSS class "categoriesMenu" to something else.

 

Regards

Jim

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

Link to comment
Share on other sites

thank you it works with two box on homepage

 

i test with only box, it's ok on homepage but i have a problem on product info. (it's ok with original categorie box)

 

i add c.parent_id = '62' for view my categories

     function getData() {
     global $categories_string, $tree, $languages_id, $cPath, $cPath_array;

     $categories_string = '';
     $tree = array();

     $categories_query_raw = "
       select
         c.categories_id,
         cd.categories_name,
         c.parent_id
       from
         " . TABLE_CATEGORIES . " c
         join " . TABLE_CATEGORIES_DESCRIPTION . " cd
           on cd.categories_id = c.categories_id
       where
         c.parent_id = '62'
         and cd.language_id='" . ( int )$languages_id ."'
       order by
         sort_order,
         cd.categories_name
     ";

 

is possible to view problem on My website test

it's strange it works on the homepage

 

Regards,

Chris

Edited by ntls2000
Link to comment
Share on other sites

The categoriesMenu class is missing from the categories box main div (Line 239 of the original bm_categories_accordion.php). The Javascript attaches to that class, so it doesn't start when the class is absent.

 

Regards

Jim

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

Link to comment
Share on other sites

The categoriesMenu class is ok.

 

I test with original categories accordion, all is ok. I change only c.parent_id = '0' to c.parent_id = '62' . Homepage is ok but on productinfo there is a problem. ( i use only box categories accordion for test)

 

if i use "http://mdchips.com/mdchips/product_info.php?cPath=22_28&products_id=51" it's ok but i use "http://mdchips.com/mdchips/product_info.php?products_id=51" problem.

 

i have a problem with cPath , i think.

 

Did you have idea jim ?

 

Thanks

Link to comment
Share on other sites

All I can tell you is what I can see on your page. I can't duplicate this error on my test site. I can say that cPath errors will cause all kinds of weird problems.

 

Regards

Jim

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

Link to comment
Share on other sites

Hmmz, this is no good here..

 

The only way i can get this module to works is to turn-off cache..

And if i do i get an menu with no layout, only links... (thats not the main problem, the cache is)

 

Any ideas to make it work with cache?

Edited by demz
Link to comment
Share on other sites

Hi Jim,

 

When i try that it wont work..

The moment i turn on the cache (config -> use cache) it reverts to its old state (non working)..

 

Check the screens out:

 

Wont work:

wontwork.jpg

 

Works, but layout is no good..

 

works.jpg

Edited by demz
Link to comment
Share on other sites

Again, turn the cache off and leave it off.

 

Now tell me what you think isn't working. I can't see anything wrong in your images.

 

Regards

Jim

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

Link to comment
Share on other sites

WELL JIM :blink:

 

"Make it work without the cache first. Then flush the cache and it should continue to work."

 

Above sentence implies the opposite of your big letter in previous post.

Only have one conclusion and that is that this contribution is not suited for my webshop, customers love the speed :)

Link to comment
Share on other sites

Hello,

 

Is there a way so when you click on a category link it doesnt load the page but just expands (For example: you click on the "Hardware" link on the navbar while on index.php and it expands the category but still stays on index.php instead of going to the category list page)

 

 

Thank you

Link to comment
Share on other sites

That could be done. You would need to modify the code to pull all of the categories (currently only pulls top level plus one expanded). Then it's a simple matter of removing the links that load the subcategory pages. So yes it can be done, but not easily.

 

Regards

Jim

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

Link to comment
Share on other sites

That could be done. You would need to modify the code to pull all of the categories (currently only pulls top level plus one expanded). Then it's a simple matter of removing the links that load the subcategory pages. So yes it can be done, but not easily.

 

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