diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b86c6f7..ca340f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fix - Fix issue with cart btn if WebComponents library is disabled +- Fix brand suggestion redirection url ## [v5.3.1] - 2026.07.02 ### Fix diff --git a/src/view/frontend/templates/ff/communication.phtml b/src/view/frontend/templates/ff/communication.phtml index 623cbf35..ded3b978 100644 --- a/src/view/frontend/templates/ff/communication.phtml +++ b/src/view/frontend/templates/ff/communication.phtml @@ -64,7 +64,28 @@ $searchImmediate = $communicationParameters['search-immediate'] ?? 'false'; factfinder.notifications.addSuggestClickListener(origin => { if (origin.suggestion.type === `searchTerm` || origin.suggestion.type === `brand`) { - window.location.href = `/factfinder/result?query=${origin.suggestion.searchParams.query}`; + const searchParams = origin.suggestion.searchParams; + const urlParams = new URLSearchParams(); + + if (searchParams.query && searchParams.query !== '*') { + urlParams.set('query', searchParams.query); + } + + if (searchParams.filters && searchParams.filters.length > 0) { + searchParams.filters.forEach(filter => { + filter.values.forEach(val => { + urlParams.append('filter', `${filter.name}:${val.value}`); + }); + }); + } + + + const addParams = ; + Object.keys(addParams).forEach(key => urlParams.append(key, addParams[key])); + + + window.location.href = `/factfinder/result?${urlParams.toString()}`; + return false; } });