Page 1 of 1

[BUG] Filtering when in categorie

Posted: 17 Sep 2015, 13:13
by Yvler
When you are in a category and you try to filter the items.. the filter will be passed on all the items of the whole shop in stead of only the items of the category..
I think this is very confusing for visitors, who are willing to filter down the possibilities within a category ;-)

Re: [BUG] Filtering when in categorie

Posted: 17 Sep 2015, 17:27
by aimeos
It's easy to keep the category ID by adding this line to layouts/catalog/filter/tree-body-default.html:

Code: Select all

	<input type="hidden" name="<?php echo $enc->attr( $this->formparam( array( 'f_catid' ) ) ); ?>" value="<?php echo $enc->attr( $this->param( 'f_catid' ) ); ?>" />
The bigger problem might be how to enable the user to "un-select" a category? We've discussed that it might be possible in the same way as for attributes but displaying this at the right location is more challenging. There was the suggestion to make another subpart (with subparts for categories and attributes) that only cares about showing the selected options and the possibility to remove them.

Do you also have any ideas for this problem?

Re: [BUG] Filtering when in categorie

Posted: 22 Sep 2015, 07:34
by Yvler
We have this webshop: Coolblue here in Belgium
What they do: when you select a category on top, it'll stay grey/black the whole time and the category again is set in the header with some info text, so the customer know he is in this category.
The filtering (and the items for this filter) are for this category only.
The category is also shown in the breadcrumb, so if you want to go a level up, you just click there :)

Check it out:
All Apple smartphones: http://www.pdashop.be/category/196155/g ... 7938=84728
All items based on Apple iPhone (category): http://www.pdashop.be/category/196411/iphone.html

Re: [BUG] Filtering when in categorie

Posted: 22 Sep 2015, 08:27
by aimeos
It's very much the same as you can already do in Aimeos, only the layout is different - much like the "classic" Aimeos theme.

At their website you can't filter without selecting a category first, which may also be an option for Aimeos. Searching is done at a global level only, breadcrumb and category text is the same as in Aimeos.

Re: [BUG] Filtering when in categorie

Posted: 30 Sep 2015, 14:04
by Yvler
I saw you changed the code to always use the category id,
but is there a way to filter out the "filter items" so they contain only the items used in this category?

Re: [BUG] Filtering when in categorie

Posted: 30 Sep 2015, 14:13
by aimeos
Yvler wrote:I saw you changed the code to always use the category id,
but is there a way to filter out the "filter items" so they contain only the items used in this category?
No, there's currently only the way to hide those attributes after the product counts are loaded like described here:
help-f15/attribute-and-sorting-t475.html

If you submit a PR for this we will integrate it for sure :-)

Re: [BUG] Filtering when in categorie

Posted: 19 Oct 2015, 14:09
by aimeos
Yvler wrote:When you are in a category and you try to filter the items.. the filter will be passed on all the items of the whole shop in stead of only the items of the category..
I think this is very confusing for visitors, who are willing to filter down the possibilities within a category ;-)
We reverted this back to the original behavior because otherwise users are confused that they only find products in the current category, not in the whole shop ;-)

To allow both behaviors, we've added a new configuration option. Here's the current implementation:
https://github.com/aimeos/aimeos-core/c ... ccf90a7f82