Open
Description
This issue is automatically created based on existing pull request: #39555: Search Navigation not visible if default category has "Display Mode" other than "page"
Resolve search result navigation block visibility even if website default category has "Display Mode" with value other than "page"
Description (*)
In catalogsearch result page, the current category is the Default Category, see \Magento\Catalog\Model\Layer::getCurrentCategory()
In case the default category has Display mode value "Static block only" or "Static block and products", canShowBlock method condition is false and the navigation block is not visible.
Added a or condition to check also the routeName in canShowBlock method to avoid current behavior.
Related Pull Requests
Fixed Issues (if relevant)
- Fixes magento/magento2#<issue_number>
Manual testing scenarios (*)
- Create a product attribute of type dropdown, add two options and configure storefront properties with
- Use in Search: Yes
- Use in Layered Navigation : Filterable with result
- Use in Search Results Layered Navigation: Yes
- Add the attribute to Default attribute set
- Create 2 simple products (Default attribute set), and for each product set different value for the new attribute previously added.
- In Catalog > Category > Default Category set the Display mode "Static block only" or "Static block and products" and save
- Reindex and clear cache
- Layered navigation block is visible in search result page, previously was not.
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Pull Request In Progress