Skip to content

Commit

Permalink
Fixed category counts
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jun 14, 2022
1 parent ea8a352 commit 7f4e1bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/client/html/catalog/count/tree-body.php
Expand Up @@ -14,7 +14,7 @@
var id = $(item).data("id");

if(catalogCounts[id]) {
$("a.cat-link, a.name", item).append('&nbsp;' + '<span class="cat-count">' + catalogCounts[id] + '</span>');
$(":scope > a.cat-link, :scope > .item-links > a.name", item).append('&nbsp;' + '<span class="cat-count">' + catalogCounts[id] + '</span>');
} else if( $(item).hasClass("nochild") ) {
$(item).addClass("disabled");
}
Expand Down

5 comments on commit 7f4e1bf

@Metalicss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello. It is not displaying cat count when using ":scope" part. Do I miss anything about that? I mean:
NOT WORKİNG --> $(":scope > a.cat-link, :scope > .item-links > a.name", item).append(' ' + '' + catalogCounts[id] + '');
WORKİNG --> $("a.cat-link, .item-links > a.name", item).append(' ' + '' + catalogCounts[id] + '');

@aimeos
Copy link
Owner Author

@aimeos aimeos commented on 7f4e1bf Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$("a.cat-link, .item-links > a.name", item).append(' ' + '' + catalogCounts[id] + ''); causes displaying two counts instead of one, so that doesn't work too while :scope works pretty well in modern browsers. Which browser do you use?

@Metalicss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Safari latest version. But I tested also with the latest versions of Chrome and Opera. It doesn't work on none of them.
Maybe my problem is caused by mismatch versions of Aimeos and Distribution package. I will check all after a fresh install.
By the way, Aimeos version dependency for "22.4.1 aimeos_dist" is still 21.10.0-21.10.99.
Ekran Resmi 2022-06-19 03 12 45

@Metalicss
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is working after fresh install. Thank you, sorry for bothering.

@aimeos
Copy link
Owner Author

@aimeos aimeos commented on 7f4e1bf Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Aimeos distribution dependency has been fixed in dev-master. Thanks for noticing!

Please sign in to comment.