Jump to content
kymation

[Addon] Categories Accordion Box for 2.3.1

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

There is no column_left.php in osCommerce 2.3.1.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

There is no column_left.php in osCommerce 2.3.1.

 

Regards

Jim

 

Any ideas how i would go about doing that?

 

memzz

Share this post


Link to post
Share on other sites

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

 

Regards

Jim


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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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...

Share this post


Link to post
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...

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Hi Jim,

 

Love this addon, Makes the website look so much better. Just one question. How easy will it be to make all the menus such as the manufactures, information etc use the accordion menu?

 

 

Regards

 

Bret

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×