Jump to content



Photo
- - - - -

[Addon] Categories Accordion Box for 2.3.1


  • Please log in to reply
372 replies to this topic

#1   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 15 February 2011 - 04:31

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, 15 February 2011 - 04:35.

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#2   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 15 February 2011 - 05:03

And to forestall the inevitable demands for screenshots:

[img]http://www.kymation.com/pub/accordion_1.jpg[/img]

[img]http://www.kymation.com/pub/accordion_2.jpg[/img]

[img]http://www.kymation.com/pub/accordion_3.jpg[/img]

Regards
Jim

Edited by kymation, 15 February 2011 - 05:03.

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#3   sdstransport

sdstransport
  • Members
  • 2 posts
  • Real Name:Star Daniel Ståhl

Posted 16 February 2011 - 17:50

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.
[img]http://forumbilder.se/images/f56201164221Pf248.jpg[/img]

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:
[img]http://forumbilder.se/images/fa6201164634P5cc7.jpg[/img]

Ok.. but what happens if i click a link whit sub cats in it. ohh noo.. now the whole code is messed up...
[img]http://forumbilder.se/images/816201164744P7cf1.jpg[/img]

If i copy the link to the page when the sub is open and then delete cache and eveything like it i get this:
[img]http://forumbilder.se/images/a46201164924Pe3e8.jpg[/img]

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, 16 February 2011 - 18:04.


#4   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 February 2011 - 18:12

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#5   sdstransport

sdstransport
  • Members
  • 2 posts
  • Real Name:Star Daniel Ståhl

Posted 16 February 2011 - 18:32

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!

#6   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 February 2011 - 21:19

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#7   altoid

altoid
  • Community Sponsor
  • 1,021 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 17 February 2011 - 03:40

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.

#8   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 February 2011 - 04:08

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:

[img]http://www.kymation.com/pub/accordion_4.jpg[/img]

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#9   altoid

altoid
  • Community Sponsor
  • 1,021 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 17 February 2011 - 10:53

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.

#10   ntls2000

ntls2000
  • Members
  • 5 posts
  • Real Name:Chris

Posted 18 February 2011 - 14:12

Hi,

i have two categories box , is possible ?

i'm tested with 2 box accordion but only one works. the second are not styled.

Excuse me for my bad english

#11   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 February 2011 - 17:38

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#12   ntls2000

ntls2000
  • Members
  • 5 posts
  • Real Name:Chris

Posted 20 February 2011 - 00:46

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, 20 February 2011 - 00:46.


#13   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 20 February 2011 - 00:59

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#14   ntls2000

ntls2000
  • Members
  • 5 posts
  • Real Name:Chris

Posted 20 February 2011 - 10:14

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/m...products_id=51" it's ok but i use "http://mdchips.com/m...products_id=51" problem.

i have a problem with cPath , i think.

Did you have idea jim ?

Thanks

#15   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 20 February 2011 - 16:42

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#16   demz

demz
  • Members
  • 13 posts
  • Real Name:Mike

Posted 22 February 2011 - 08:27

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, 22 February 2011 - 08:27.


#17   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 22 February 2011 - 16:47

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

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#18   demz

demz
  • Members
  • 13 posts
  • Real Name:Mike

Posted 22 February 2011 - 21:57

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:
[img]http://www.schluter-it.nl/wontwork.jpg[/img]

Works, but layout is no good..

[img]http://www.schluter-it.nl/works.jpg[/img]

Edited by demz, 22 February 2011 - 21:58.


#19   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,211 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 22 February 2011 - 22:13

No, that is working. You just need to change the styling to make it look the way you want it to.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#20   demz

demz
  • Members
  • 13 posts
  • Real Name:Mike

Posted 23 February 2011 - 06:28

Well its not working /pinch.gif' class='bbc_emoticon' alt='>_<' />

I know about the layout, i dont care, those are worries for later.
But still the cache problem exsists..