Questions tagged [layered-navigation]

Layered navigation makes it easy to find a product based on category, price range, or any other available attribute.

Filter by
Sorted by
Tagged with
4 votes
2 answers
268 views

Magento 2.4.5 layered navigation filter showing incorrect results

I've recently updated a non-production version of a website from 2.4.4 to 2.4.5. The site has a number of configurable products with options for colours etc. The simple products behind the ...
0 votes
1 answer
29 views

Magento 2 how to get product Ids in the Product listing page without pagination

I want to get the listed product's IDs in the product listing page without pagination. But the products will be listed with pagination. If it is filtered by layered navigation/search then I want that ...
1 vote
1 answer
29 views

How to remove particular filters from a specific category?

I want to remove the color and price filter only for the specific category in Magento 2.4.3-p1. I created a separate XML file (catalog_category_view_id_{category_id}.xml) and apply the below code. &...
  • 2,172
0 votes
1 answer
25 views

Rename Shop by and clear all text in left side Magento2

I want to change the text SHOP BY and clear all from left sidebar in list page
  • 445
0 votes
0 answers
20 views

How do I add a custom filter to layered navigation?

I need to add a new filter to this menu Filter items should be active categories that are not in the menu. I plan to get them this way: public function getCategoryCollection() { $...
0 votes
0 answers
28 views

Add Filter in Layered Navigation

i created an extra field in elasticsearch via an CustomDataProvider. Now i want to have those new fields from elasticsearch in the Layered Navigation. I found old examples for magento 1.x, but no new ...
  • 11
0 votes
0 answers
130 views

Product Filter Count Showing Wrong Count After Custom Product Collection - Magento Layered Navigation

I have applied custom filter on product collection to hide certain products from listing page. I have used below event for same <event name="catalog_product_collection_load_after"> ...
  • 3,554
0 votes
0 answers
13 views

Add Block To Layer Navigation As Filter Field

The layer navigation will display the filters when we config field use in Layer Navigation of product attribute as the document https://docs.magento.com/user-guide/catalog/navigation-layered-...
0 votes
0 answers
16 views

Magento 2: Product's Layered Navigation Filter DIsplay Type API

I am working on Rest API. I want a product filter type (checkbox, multiple selections,yes/no) so that mobile filters can be shown based on that. For example on website filters showing like this : How ...
  • 1,130
0 votes
0 answers
55 views

Adding Multi-Select Color Extensions in Layered Navigation of Magento 2

I need to add multi-select color extensions in my website , Can u suggest some extensions for this module in Magento 2 from this list weltpixel - https://www.weltpixel.com/improved-magento-2-layered-...
  • 1
0 votes
0 answers
13 views

Layered navigation click attribute filter ,Don't removed in the layernavigation magento 2.4.3

In default Magento, if we select any attribute from layered navigation to filter, the filtered products are shown but the selected attribute is removed. We need to display the selected attribute as ...
0 votes
0 answers
30 views

How to get child products from Layer Class Magento 2

14219 is the ID of the parent product. 14217, 14218 are the child product ids, I need to get from the Layer which products visibility is VISIBILITY_NOT_VISIBLE , can anyone help? Thanks class Layer ...
  • 728
0 votes
0 answers
27 views

Stock sources as filters layered navigation

I'm quite new to Magento2 so correct me if there is anything unclear or impossible to do. We have different stock sources (stock for Europe and for the UKs). I would like our customers to be able to ...
0 votes
0 answers
24 views

How to show simple products after layered navigation filter Magento 2?

I have set visibility catalog, search but still not showing simple, only showing parent configurable product in catalog search. After that i did 1)cache:clean 2)indexer:reindex does anyone know what ...
  • 728
0 votes
0 answers
24 views

magento 2.4 product count not correct in layer navigation

Team, I am facing an issue with layer navigation category product count in 2.4 for every subcategory displaying disabled products also but in 2.3 it works fine after the upgrade facing the issue. For ...
0 votes
0 answers
62 views

Any idea, from where the layered Navigation Count on left side for Attrributes On Magento 2

Do anyone knows, from where the count collection of Attribute Comes from in the code. level. Here the File that display outcome of Collection Count. vendor\magento\module-layered-navigation\view\...
0 votes
0 answers
62 views

Trouble with Mageplaza LayeredNavigation and Search

Trouble with Mageplaza LayeredNavigation and Search When I run a search, I get this error 1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Sorry, something went wrong. ...
0 votes
0 answers
145 views

Add custom non-attribute filter when elastic search is enabled

I want to add custom non-attribute filter(data is coming from custom table which has product id as foreign key) when elastic search. I have already done for MySql engine but in case of Elastic search,...
  • 675
0 votes
1 answer
170 views

One category showing wrong sidebar layered navigation

I am using Porto theme, I upgraded Magento 2.2.4 to Magento 2.4.2, every thing working fine but there are 1 problem, all category page using app/design/frontend/Smartwave/porto/...
0 votes
0 answers
118 views

Catalog Graph Ql to use new layer from layerpool

I have created 2 custom modules to use a custom layer. This custom layer will filter the list of products by customModel Id (which converts to entity_id IN [...]) instead of the default category ...
0 votes
0 answers
89 views

Magento2 remove specific filter on specific category value under Layered navigation

I'm trying to hide/disable a particular attribute filter in layered navigation for a specific category. I do not want to show all filter in left side bar. If I disable in Anchor is "No" ...
0 votes
0 answers
66 views

How to add custom filter in layered navigation magento 2

I have to add some custom filters in layered navigation in Magento 2. These filters will be non-attribute filters and data will get filtered from a custom table. Any help would be appreciated.
  • 675
0 votes
0 answers
33 views

How we add a custom function to \Magento\LayeredNavigation\Block\Navigation

I overrode the \Magento\LayeredNavigation\Block\Navigation block and added a custom function, but while rendering the function in view.phtml, it shows a function not found error. Any once can help me. ...
0 votes
1 answer
451 views

How to get product collection total with pagination in magento 2

I have implemented pagination with limit & offset but when I am fetching the collection total after applying multiple filters then it's giving the wrong total count. $layer = $...
4 votes
1 answer
769 views

Custom condition for Elastic search collection in Magento 2

I am trying to add the custom condition for the product collection using the below plugin for elastic search. app/code/Vendor/Module/etc/frontend/di.xml <type name="Magento\Elasticsearch7\...
  • 135
0 votes
0 answers
126 views

Magento 2 catalog search - request query and filters aren't set

I am configuring a fresh Magento 2 installation, and encountered a problem with the catalog search. The request returns this exception: #1 Magento\Framework\Data\Collection\AbstractDb->...
  • 165
0 votes
2 answers
1k views

How to solve this Exception #0 (Magento\Framework\Exception\StateException): The bucket doesn't exist

1 exception(s): Exception #0 (Magento\Framework\Exception\StateException): The bucket doesn't exist. Exception #0 (Magento\Framework\Exception\StateException): The bucket doesn't exist. #1 Magento\...
  • 13
0 votes
0 answers
35 views

Magento 2: Get Layered Navigation filters by store id

We are fetching layered navigation filters as follows: $layer = $layerResolver->get(); $layer->setCurrentCategory(2); $productCollection = $layer->getProductCollection(); $productCollection-&...
  • 550
0 votes
0 answers
24 views

Layered navigation results show only products with and-and attributes, now showing or-or attributes, Magento 2

How can I do and-and filter when filtering with layered navigation? For example: When I filter attributes (size = 50, color = red), the result returns a configurable product when some of this child ...
  • 728
0 votes
0 answers
250 views

How to fix layered navigation error in 3rd party module with category and price filters?

Running Magento 2.3.4 with Webkul Multivendor Marketplace Module and it is having compatibility issues with Mageplaza Ajax Layered navigation. The layered navigation and ajax filters doesn't seem to ...
  • 1
0 votes
1 answer
219 views

Magento 2: How to remove category layered navigation from search result

In Magento2.4.x how to hide categories from left side layered navigation on search result page only. Is there any setting/configuration or will have to do through code There is a configuration here ...
  • 131
0 votes
0 answers
66 views

Magento 2 shop by price is not showing on sub category pages

Magento 2.3.5-p2 shop by price is not showing on the subcategory page, it is showing on category pages
  • 1,173
0 votes
2 answers
953 views

Magento 2.4.1 Layered navigation with custom product collection

I want to override category product collection on the category product page in front-end. I want to show collection according to attribute set. After customize collection layered navigation product ...
  • 71
1 vote
0 answers
37 views

How does product count on layered navigation in Magento 2.4 is being rendered?

i'm using magento 2.4.1 and successfully overriding the product collection for layered navigation by overriding the getProductCollection method. The problem is the layered navigation sidebar showing ...
  • 79
1 vote
1 answer
87 views

How can i create custom filter with custom attribute in header panel in magento 2?

I create one product attribute which name "country" type drop-down. in that i add two country there US and CA now at front-end , front header show custom drop-down with that product option . ...
0 votes
0 answers
118 views

I want to add qty filter same as price filter in layered Navigation in Magento 2

In this i want to develop functionality in which qty filter is added and in that range is displayed in layered navigation as price filter. qty range as below: 1 - 50, 50 - 100, 100 - 150, ... so can ...
  • 507
0 votes
2 answers
217 views

Magento 2 How to change attribute filter position in layered navigation

I want to move the climate product attribute position from the bottom to the third position. Can you please help me out?
  • 384
0 votes
1 answer
489 views

Product collection override but filter not magento in Magento 2.4

I have override vendor/magento/module-catalog/Model/Layer.php for custom product collection but now the layer navigation and product count is working wrong, I checked for Magento\CatalogSearch\Model\...
  • 749
1 vote
2 answers
71 views

addAttributeToFilter for Multislect Attribute Update Query Magento 2

I have Multiselect product attribute and i want to filter product by that attribute. Currently i am using below code, $productCollection = $this->getLayer()->getProductCollection(); $...
1 vote
1 answer
465 views

Custom Product Collection not Getting Filtered by Layered Navigation in Magento 2.4.1

I am trying to create a page that show a list of products that have price which is greater than some specific amount and i also want to add Layered navigation for filter these product collection based ...
0 votes
1 answer
833 views

Magento 2.4 | Filters are no longer seen with Elasticsuite

I have updated Magento to version 2.4.2 and have also activated Elasticsuite as the default search engine. Elasticsuite installation went smoothly and the module is correctly installed. The search bar ...
  • 327
0 votes
1 answer
32 views

How to we move current applied filter state to center of the page just beside the sortby

In the category page layered navigation, I want to move the current applied filter state just beside the sort by or center of the page. Can anyone please help me out?
-3 votes
1 answer
581 views

Magento2: Can we add range slider on product attribute

[![enter image description here][1]][1] In current magento2 provide range slider on product attribute "price". I have requirement range slider on Case Diameter.
  • 1
1 vote
1 answer
495 views

After update Magento 2.3.5 to 2.4.2 on all category pages error: Exception #0 (RuntimeException): Catalog Layer has been already created. How fix?

After updating the version, I started getting on all category pages this error: Exception #0 (RuntimeException): Catalog Layer has been already created This is error in: vendor/magento/module-catalog/...
4 votes
3 answers
793 views

Magento 2.4: show variant images of configurable product based on filter

i have configurable product on listing page with swatches enabled . Configurable product has images swatches - Red , Green, Blue. Not when i applied Color - filter as Red still images on Listing page -...
0 votes
1 answer
30 views

No categories in the layered navigation

I stuck with a problem that some of the categories won't show in the layered navigation. An anchor is enabled, re-indexation and cache clearing made many times, changed the theme to default Luma. ...
  • 101
0 votes
1 answer
64 views

CATEGORY filter appearing two times

In Layered navigation There are two filters of same name appearing two times how can I remove the above one: We want to remove the first CATEGORY FILTER AND make the second to be displayed only?
1 vote
1 answer
1k views

Layered Navigation Filter Problem. Working in Magento 2.3.2 but not in Magento 2.4.1

I created this module about a year ago. Maybe because of elasticseach search engine or something now I am facing this error in Magento 2.4.1 main.CRITICAL: Error: Call to undefined method Magento\...
1 vote
1 answer
199 views

Show only filters in layered navigation for search results where all products have that filter populated

I am trying to implement this feature: the filters that are shown in the search results page are only visible if every products in that results page have the attribute linked with the filter populated....
0 votes
1 answer
153 views

Magento 2 How to get layer navigation filters available in rest api?

Here am trying to get layered navigation available filters here is my code $filterableAttributes = $this->filterableAttributes; $layerResolver = $this->layerResolver; $...

1
2 3 4 5
17