Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ah-net committed Jan 23, 2024
2 parents f2990d5 + da6b091 commit 2f2d8bc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
11 changes: 5 additions & 6 deletions Model/Catalog/Layer/Url/Strategy/QueryParameterStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,12 @@ public function getCategoryFilterSelectUrl(MagentoHttpRequest $request, Item $it
sprintf(
'%s/',
trim($categoryUrlPath, '/'),
[
'_query' => $this->getAttributeFilters($request)
]
)
),
[
'_query' => $this->getAttributeFilters($request)
]
);


/*
We explode the url so that we can capture its parts and find the double values in order to remove them.
This is needed because the categoryUrlPath contains the store code in some cases and the directUrl as well.
Expand Down Expand Up @@ -429,7 +428,7 @@ public function apply(MagentoHttpRequest $request, ProductNavigationRequest $nav
$query = $request->getQuery();
$query->set(SELF::PARAM_ORDER, $sortOrder);
$request->setQuery($query);

$navigationRequest->setOrder($sortOrder);
}

Expand Down
5 changes: 5 additions & 0 deletions Model/Client/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ public function addCategoryPathFilter(array $categoryIds)
$categoryIds = array_map('intval', $categoryIds);
$storeId = (int) $this->getStoreId();
$tweakwiseIdMapper = function (int $categoryId) use ($storeId) {
//don't add prefix for root category 1.
if ($categoryId === 1) {
return '';
}

return $this->helper->getTweakwiseId($storeId, $categoryId);
};
$tweakwiseIds = array_map($tweakwiseIdMapper, $categoryIds);
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Source/CategoryView.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class CategoryView implements OptionSourceInterface
protected function buildOptions()
{
return [
['value' => self::EXTENDED, 'label' => __('Extended')],
['value' => self::SIMPLE, 'label' => __('Simple (deprecated)')],
['value' => self::EXTENDED, 'label' => __('Extended')],
];
}

Expand Down
6 changes: 4 additions & 2 deletions Model/Seo/FilterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ public function shouldFilterBeIndexable(Item $item): bool
public function shouldPageBeIndexable(): bool
{
foreach ($this->getActiveFilterItems() as $item) {
if (!$this->shouldFilterBeIndexable($item)) {
return false;
if ($item instanceof Item) {
if (!$this->shouldFilterBeIndexable($item)) {
return false;
}
}
}

Expand Down

0 comments on commit 2f2d8bc

Please sign in to comment.