The filter sometimes disappears

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

The filter sometimes disappears

Post by TGergo » 08 Dec 2022, 14:02

php version 8.1
Windows 10
Aimeos version 2022.10.2.


Hello!

The filter sometimes disappears. (it doesn't appear when I click on it)
The javascript works well.
<div class="attribute-lists" style="display: block;">
But it doesn't appear.
Sometimes works well, I don't know why. I have no javascript console error.
HTML included filter data.

I think, <fieldset class="attr-sets" keeps display: none;

/* Enabled by JS */
.catalog-filter-attribute .attribute-lists fieldset.attr-sets,
.catalog-filter-attribute .attribute-lists fieldset.attr-sets .attr-list {
display: none;
}

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: The filter sometimes disappears

Post by aimeos » 09 Dec 2022, 14:38

The fieldsets for the attribute types are automatically hidden if there are no products matching one of their attributes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: The filter sometimes disappears

Post by TGergo » 12 Dec 2022, 13:15

I understand, but I have products for filter.
I can read in the HTML code.

For example: Years

But the Filter sometimes show, sometimes keep display:none.

Other thing I don't understand
I have product from year 1971.
But it's not in the filter, gives a result when I click on it.

I ran it:
php artisan aimeos:clear;
php artisan cache:clear;
aimeos_years.jpg
aimeos_years.jpg (32.85 KiB) Viewed 1807 times

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: The filter sometimes disappears

Post by aimeos » 13 Dec 2022, 08:35

Do you have a lot of products (> 10,000)?
In that case, there's a (configurable) limit of how much products are counted for the filter.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: The filter sometimes disappears

Post by TGergo » 13 Dec 2022, 10:46

I have 8000 records.

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: The filter sometimes disappears

Post by TGergo » 13 Dec 2022, 12:19

For the first problem.

in the catalog-filter.js #213

/**
* Shows the attribute filter if products are available for
*/
onShowAttributes() {

// sometimes empty
console.log($(".catalog-filter-attribute .attribute-lists .attr-count"));

$(".catalog-filter-attribute .attribute-lists .attr-count").each((idx, el) => {
$(el).closest("fieldset.attr-sets").show();
});
},

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: The filter sometimes disappears

Post by aimeos » 14 Dec 2022, 08:59

Try to increase the aggregation limit e.g. to 25000:
https://aimeos.org/docs/2022.x/config/m ... ger/#limit
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: The filter sometimes disappears

Post by TGergo » 14 Dec 2022, 09:58

aimeos wrote: 14 Dec 2022, 08:59 Try to increase the aggregation limit e.g. to 25000:
https://aimeos.org/docs/2022.x/config/m ... ger/#limit
Thank You, It works fine at 50000.

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: The filter sometimes disappears

Post by aimeos » 14 Dec 2022, 10:02

Please take in mind that counting that many rows will slow down response time!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply