Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit 3d7e52d

Browse files
author
Edwin Jacobs
committed
Sanitized filters with strtolower as the attribute map construction applies a strtolower
1 parent 06c6ff3 commit 3d7e52d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/local/Emico/AttributeLanding/Model/Tweakwise/UrlStrategy/AttributeLandingStrategy.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,15 @@ protected function buildFilterHash(array $filters, int $categoryId = null)
142142
return null;
143143
}
144144

145+
foreach ($filters as $key => $filterValues) {
146+
$sanitizedFilters = array_map('strtolower', $filterValues);
147+
$filters[$key] = $sanitizedFilters;
148+
}
149+
145150
if ($categoryId !== null && !$this->isRootCategory($categoryId)) {
146151
$filters['category'] = $categoryId;
147152
}
153+
148154
ksort($filters);
149155
return md5(json_encode($filters));
150156
}
@@ -231,4 +237,4 @@ public function buildCanonicalUrl(Emico_Tweakwise_Model_Catalog_Layer $state)
231237
{
232238
return $this->buildUrl($state);
233239
}
234-
}
240+
}

0 commit comments

Comments
 (0)