Product Filters

[quote name=‘DonDan’]I’m sorry about my bad english :wink:



I just tried some improvmnets about filters, you can publish more filters option with 2 constants in file: core/fn_catalog.php



define(‘FILTERS_RANGES_COUNT’, 2);

define(‘FILTERS_RANGES_MORE_COUNT’,4);



Also you must erase/chagne some lines in product_filters.tpl with class hidden.[/QUOTE]



This doesn’t appear to be handled the same way in 2.0.12. Anyone know where the limit is in 2.0.12? It still shows 4 items, but the code is not in the php file.

OK, I want to almost the opposite of most people here, I want to hide the filter options (sort of), I am going to create a accordion menu for these options.



My problem is not getting the accordion to work, but rather related to using My Changes.

I will need to override the blocks/product_filters.tpl file but do not know where I should put the override file (and name it) in the ‘my_changes’ folder.



do I save it as: addons/my_changes/blocks/product_filters.override.tpl ??

Do I need to add a hook to the original file, or can a entire file be overridden without the hook?

There is currently no hook in /skins/YOURSKIN/customer/blocks/product_filters.tpl so there is no major advantage to using the hook implementation. You have two options:

  1. make all your changes directly in /customer/blocks/product_filters.tpl, or
  2. create a hook (you can name it whatever you want) in /customer/blocks/product_filters.tpl and then make your changes in the hooked file with the name of WHATEVER.override.tpl. You would still need to add the open/close hook tags to /customer/blocks/product_filters.tpl each time it is updated but this might be marginally easier to maintain.



    If their is much interest in this type of mod, you could ask the developers to add an official hook to /customer/blocks/product_filters.tpl



    Bob

right, since there is no hook already (and yes I find that its much easier to maintain if I add a hook) I have added the hook: {hook name="blocks:product_filters"}

and have created the file: addons/my_changes/hooks/blocks/product_filters.override.tpl



I have changes the rendering of the filters to be 2 levels of lists and added the code to make them function as a accordion menu. (see [url]http://www.i-marco.nl/weblog/jquery-accordion-menu-redux/[/url] )



I wish every template had at least a full override hook by default, but at least I am getting a better sense of where and how to use the my_changes addon.

RSW



I would love to have my product filter accordion style like yours is! I checked out your link and I love it!



I generally know my way around cs cart but can i ask you to specify a bit more exactly what you did and where and the code the needs to be changed.



thanks so much!



Carola

[quote name=‘krola’ timestamp=‘1309710237’ post=‘116170’]

RSW



I would love to have my product filter accordion style like yours is! I checked out your link and I love it!



I generally know my way around cs cart but can i ask you to specify a bit more exactly what you did and where and the code the needs to be changed.



thanks so much!



Carola

[/quote]

Check the following thread it should be helpful.

[quote name='hbtrading' timestamp='1309714361' post='116172']

Check the following thread it should be helpful.

Jquery Feature Dropdown - Store Design & Templates - CS-Cart Community Forums

[/quote]



Thanks!

However I installed but it's not working for me. Maybe becaus I'm using 2.0.11. Or because I had some custom work done on the filters. CS cart added a filter based on global options for me.



Any ideas?



Thanks again!

How to implement this to 4x?