shopware / shopware

Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
https://shopware.com
MIT License
2.76k stars 1.01k forks source link

foreignReviewsCount articifially set to 150 #4212

Open shopwareBot opened 1 month ago

shopwareBot commented 1 month ago

In storefront/page/product-detail/review/review.html.twig line 22 (same applied to the corresponding component template), the foreignReviewsCount variable is set to a fixed value of 150 in the beginning for no apparent reason.

This means that not only the language filter is be shown regardless of wether or not there actually are any foreign-language reviews, but the number of displayed reviews set later on in the same template (line 179) by

{% set listReviewsCount = productReviewCount - foreignReviewsCount %}

will always be <=0 if there are less than 150 reviews in total. There is a

aragraph in line 185 that apparently is supposed to display the number of shown reviews to the user, but since it checks for a positive number in listReviewsCount, it is never shown. The surrounding

persists as an empty element.

Since the

still uses a Bootstrap 4 class and with this bug existing for years seemingly unnoticed it hasn't been shown with less than 151 reviews in all that time, maybe the entire

can just be removed now. Either way, the foreignReviewsCount should be set to an actually meaningful number - i.e., if there are no foreign-language reviews, 0.

shopware-issue-bot[bot] commented 1 month ago

We found the following existing issues which may help or are related to your topic:

shopwareBot commented 1 month ago

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-34000.

[created from NEXT-34000, comment 485970]

janobi commented 3 weeks ago

This was first reported for 6.5.8.6 and is still an issue in 6.6.5.1.