Magento2: "Shop By" button disabling broken on the search page

Created on 31 Jan 2018  路  6Comments  路  Source: magento/magento2

The "Shop By" button becomes disabled once any additional filters are pointless (they would yield the same one product or no products at all). It works like that on category pages (e.g. "women/tops-women/jackets-women.html"), but it's broken on the search page.

The technical cause is the disabling overlay being positioned _below_ the search results / products on the search page, which is way off the button which is positioned _above_ the search results.

In category pages, the overlay (along with the filtering details) is positioned _above_ the search results.

Preconditions

  1. Magento CE 2.2.2 with sample data is installed by Composer.

Steps to reproduce

  1. click on the "Search" icon and search for "jacket";
  2. resize the window to a mobile size;
  3. click on "Shop By" and choose a filter with one product (e.g. "Category -> Gear");

Expected result

  1. The button "Shop By" should become disabled.

Actual result

  1. The button "Shop By" is still enabled.
dmcdindia Fixed in 2.2.x Fixed in 2.3.x Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x

All 6 comments

@JanisE, thank you for your report.
We've acknowledged the issue and added to our backlog.

I am going to work on this issue #dmcdindia

@balaganeshg thank you for joining. Please accept team invitation here and self-assign the issue.

Hi, i've analyzed the code in the catalogsearch and in the catalog-category page after adding filters.

I've noticed that in the catalogsearch page is missing the class "page-with-filter" in the body when a filter is added.

I've tried to add manually this class in the code inspector, after i've selected a filter, and if this class is present the code will work correctly, the state filter is displayed immediately after the "shop by" button, and the "shop by" button will be disabled.

So, i think the solution is adding the class "page-with-filter" in the body of the catalogsearch page when a filter is selected, like in the catalog-category page.

I've added the class in the catalogsearch_result_index.xml and seems to work.

Can i send you this modification?

Hi @JanisE. Thank you for your report.
The issue has been fixed in magento/magento2#15650 by @AndreaRivadossi in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.7 release.

Hi @JanisE. Thank you for your report.
The issue has been fixed in magento/magento2#17418 by @mage2pratik in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Was this page helpful?
0 / 5 - 0 ratings