Skip to content

Commit

Permalink
Fix filterpath url personal merchandising refresh (#130)
Browse files Browse the repository at this point in the history
* Fix filterpath url personal merchandising refresh
  • Loading branch information
ah-net committed Jan 10, 2024
1 parent b3365d9 commit cceca06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Model/Catalog/Layer/Url/Strategy/PathSlugStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,13 @@ public function buildFilterUrl(MagentoHttpRequest $request, array $filters = [])

if (empty($currentFilterPath)) {
$urlParts = parse_url($currentUrl);
$url = $urlParts['path'] . $newFilterPath;

if (strpos($urlParts['path'], $newFilterPath) === false) {
$url = $urlParts['path'] . $newFilterPath;
} else {
//filter path already exists in url
$url = $urlParts['path'];
}
if (isset($urlParts['query'])) {
$url .= '?' . $urlParts['query'];
}
Expand Down

0 comments on commit cceca06

Please sign in to comment.