Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Categories Accordion Box for 2.3.1


kymation

Recommended Posts

Jim,

love this one, tested on my oflline shop and looks awesome so decided to implement on my live site.

Copied the files, truned off teh cache but i get this error:

Fatal error: Cannot redeclare class bm_categories_accordion in /home/jamel/domains/jamello.nl/public_html/includes/modules/boxes/bm_categories_accordion.php on line 14

quadruple checked everything i could but i think i must overlook something probably very simple. Can you help me out?

Everything is conditional, you just can't always anticipate the conditions.

Link to comment
Share on other sites

That usually means that you copied the code file to the languages directory. There are two different files in this distribution; check that you uploaded them to the right places. Or just upload again.

 

Regards

Jim

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

Link to comment
Share on other sites

That usually means that you copied the code file to the languages directory. There are two different files in this distribution; check that you uploaded them to the right places. Or just upload again.

 

Regards

Jim

I have 2 lagnuages installed, Dutch and English.

i already figured it out, i copied the bm_categories_accordeon from the general modules to the dutch map instead of the language/english one.

redid the correct one, now it works like a charm.

sorry, my bad.

But thanks for this great contri, makes my site looks so much better:

Old version:

screenshotwebshop.jpg

 

With the accordeon:

screenshotwebshopaccordeon.jpg

Everything is conditional, you just can't always anticipate the conditions.

Link to comment
Share on other sites

  • 1 month later...

Jim... installed the accordion module to the catagories, got a mixed result. the catagories heading is missing, now shows huge buttons for the sub categories. made sure to install the two same name files in the correct folders. what did I mess-up on; something simple? here is my current store look: http://www.discountegauges.com/

 

 

Thanks man, it's guys like you that make this world work!

 

Timmy C

Link to comment
Share on other sites

  • 3 weeks later...

Hey I'm using this as my second box

 

does anyone know what CSS would I need to activate to give it a top margin of 10px to allow a gap? or how I could edit the script to do this?

 

Thanks

 

Jonny

Link to comment
Share on other sites

Hi Jim Memzz again... hope all is well...

 

I really want a headerBox above my accordian menu... ive located this bit of code on line 240 of bm_categories_accordian:

 

$data = ' <div id="categoriesMenu">' . PHP_EOL; ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . MODULE_BOXES_CATEGORIES_BOX_TITLE . '</div>' .

 

Which i'm presuming should make my header show.... but its not working... I've double checked MODULE_BOXES_CATEGORIES_BOX_TITLE and all seems fine there... any ideas?

 

Thanks in advance,

 

Memzz

Link to comment
Share on other sites

Try this:

 

$data = ' <div id="categoriesMenu">' . PHP_EOL . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . MODULE_BOXES_CATEGORIES_BOX_TITLE . '</div>' .  . PHP_EOL;

I left the title out because I couldn't get it to look right, so this may not work.

 

Regards

Jim

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

Link to comment
Share on other sites

Try this:

 

$data = ' <div id="categoriesMenu">' . PHP_EOL . ' <div class="ui-widget-header ui-corner-top infoBoxHeading">' . MODULE_BOXES_CATEGORIES_BOX_TITLE . '</div>' .  . PHP_EOL;

I left the title out because I couldn't get it to look right, so this may not work.

 

Regards

Jim

 

Thanks Jim but no that didn't work.. it said there was an unexpected '.'....

 

I was thinking that i could insert <div class="ui-widget-header ui-corner-top infoBoxHeading"> inside column_left.php above where the accordian menu is called... but i'm having trouble finding where exactly to place it? Any ideas?

 

Thanks,

 

Mem

Link to comment
Share on other sites

Modules are self-contained, so you can't. The code needs to go inside the module.

 

Regards

Jim

 

Ok i'm gonna try to maybe create a new box that (hopefully) just contains a header, possible by using your generic_box tut, and try to place it above the BM_accordians_menu..

 

Thanks Memzz

Link to comment
Share on other sites

Awesome addon, thank you for sharing.

I have a very stupid question, but I couldn't find the answer. When I installed the addon following the guide everything shows up just fine but the new created Accordion box is in the bottom of my left column and the original Categories box from OSC still shows up in the top of that same left column. So here is my question... How can I get rid off the orginal box and replace it with the Accordion box (just like it looks like on any screenshot sent by Jim on this thread)?

:blush:

 

Thanks for the help!!

 

Greg.

Link to comment
Share on other sites

  • 1 month later...

I am also having the cache problem. It works perfectly with the cache off (Just extremely slow) and when I turn on cache it doesn't show the jquery theme anymore, and also says "MODULE_BOXES_CATEGORIES_BOX_TITLE" instead of Categories?

 

I have tried turning cache off, clearing the cache and re-enabling it - no luck. I have tried changing cache directories to a new folder/name and still no go.

 

Any suggestions?

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

 

Has anyone managed to achieve this? Would really improve functionality so people could see what is in another category without being forced leave their current page...

Link to comment
Share on other sites

It mess my shop.

Message :

 

Unable to connect to database server!!!!!!!!

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Edited by apolyshow

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Find the solution.

If you are using and another language except english make a folder for your language with the same module and copy it to your site. This it going to fix the mess of database.

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

It shouldn't be too hard. Look at the output of the Accordion box. It's controlled by the Javascript attached to the categoriesMenu ID. You'll need a n copy of that script with a different ID to control the new accordion. Then it's just a matter of using the same structure.

 

You could also add the other links into the Categories box. Just add links to the $data variable just after these lines:

     $data = '    <div id="categoriesMenu">' . PHP_EOL;
     $data .= $categories_string . PHP_EOL;
     $data .= '      </div>' . 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...

It is. The only way to speed it up would be to preload all of the categories and then select the right one using AJAX. Doing this on a large store would put a huge load on the server. It might be practical for a small store with only a few categories. In any case, the current code does not support this.

 

Regards

Jim

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

Link to comment
Share on other sites

Hello,

 

Thanks for a great addon! I have added the ability to cache the accordion category box, however it seems to make little difference on our shop as it has hundreds of sub categories but it does somewhat make a difference, so it does definately work as far as it getting cached once loaded once, I have re-uploaded a new package which allows you to reset / refresh the cache under tools>cache control too. I hope my hasty rushed upload earlier did not affect anyone, please download the new package.

 

However this is using the osc caching function, I havent quite sussed out how efficient it is except it isnt great with this addon, I might tak a look and look deeper at FWR Media's SEO multilayer pop out menu style caching as that is perfect, it seems to load as the page loads, not when a main category is clicked and so on, then cached like this addon is behaving like with caching enabled. Still as I said I have lots of sub categories which are probably the problem.

Edited by chrish123
Link to comment
Share on other sites

Thanks for the code. Cache seems to be necessary if you are showing the counts, otherwise I haven't seen much difference. It could help if you are trying to squeeze every last bit of speed out of your site.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 5 weeks later...

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