custom/static-plugins/LDSCustom/src/Resources/views/storefront/component/review/review.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/component/review/review.html.twig" %}
  2. {% block component_review_list_action_sortby %}
  3.     {{ parent() }}
  4.     <script>
  5.         let hasExecuted = true;
  6.         
  7.         document.getElementById('reviewsSortby').addEventListener('change', function () {
  8.             if (hasExecuted) return;
  9.             hasExecuted = true;
  10.             const form = document.querySelector('.review-filter-form');
  11.             const checkboxes = form.querySelectorAll('input[type="checkbox"]');
  12.             checkboxes.forEach(checkbox => {
  13.                 if (!checkbox.checked) {
  14.                     checkbox.click();
  15.                 }
  16.             });
  17.         });
  18.     </script>
  19. {% endblock %}