Questions tagged [filter]

Denotes questions about filtering in Magento (layered navigation, collection filtering)

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Magento2: How to use Magento\Framework\Api\FilterBuilder?

I am able to use the addFilter in the searchCriteriaBuilder like this: $this->searchCriteriaBuilder->addFilter( 'name', 'M%', 'like' ); For example in this code I can get all the ...
0
votes
0answers
13 views

magento 2 get folter attributes values in custom api

Hi i created custom API in magento 2 in that i need to implement advance search like store brand,model and year search like this i am able to get brand fileds ` public function getAddtocar($attribute)...
7
votes
1answer
2k views

Custom /catalogsearch/ filters

Beforehand I have to tell: I'm a total n00b on Magento and what I need to know is more a "common practice" or "standard" about how is something achieved in Magento, since I have to maintain (in record ...
3
votes
4answers
4k views

How to filter product collection with default graphql products query

I am using Magento 2 Graphql to get product collection based on category id. I want to apply filter by color, size, material etc. I have checked the graphql available filters and those are not ...
0
votes
0answers
10 views

Filter Category Options are differente when I change from one page to another?

I am facing something weird in one project that I don't know if is normal (I hadn't seen this behavior in another project). The customer reports to me that when you enter to Category first page, ...
0
votes
3answers
48 views

how to hide the filter in product listing page without modify the code base?

How to hide the filer in product listing page without touching the code? Can I do it by CSS or javascript? Thank you
0
votes
1answer
1k views

function displaying the number of found products in layered navigation filters in magento2

Which function is responsible for displaying the total count of products in the filters in the layered navigation. ie) i need to get the count (eg 50 ) in my custom filterable attributes as well. ...
0
votes
0answers
16 views

Maximum price not appearing in layered navigation

I can't get a "£100 and above" to display in my layered navigation. It's currently set to Automatic (by price range) but it's a poor experience and is happening to a variety of categories.I ...
0
votes
1answer
936 views

How i can create custom filter grid in front end magento 2

i want to create custom filter in front end how can copy the back end grid and filter for front end with working like back end filter ??? how i can code this any ideas.....
5
votes
1answer
254 views

Magento2 : How to set filter for an insert listing component while loading edit view form

I want to display all contacts of a supplier on the supplier edit page. For this, I use an insert listing component and I include the contact grid in a field set. How can I use the supplier_id to ...
0
votes
1answer
875 views

Magento 2, opposite of finset needed to filter a product collection

I have a problem in a product collection that I need to filter. I have a multiselect list with countries. When a selection is made the products need to be hidden from these countries. $collection->...
14
votes
3answers
7k views

Magento 2: How to reset filters in product grid?

I have changed per page setting to 500 in Catalog Product Grid page. It could not load that much of product and gave me error. Now it is somehow saved in somewhere, and every time I visit the Product ...
0
votes
1answer
1k views

How to add attribute filter in product listing page in magento 1.9?

How to add attribute filter.For eg, When city attribute not set in any product then this product are showing after filter of city. Here is my Product Collection List.php block file public function ...
2
votes
1answer
1k views

How can I remove the category filter from category page that do not have further any categories?

I am using Porto Theme (Magento 2) for building an e-commerce website. I have some categories that has sub-categories, so when I go to that sub-categories page, then it is showing the category filter ...
1
vote
1answer
962 views

How to get all products collection for special category

I am looking for function which is similar to getLoadedProductCollection and which retrieves all products from this category with selected filters, not only those I can see on current page like ...
0
votes
2answers
863 views

Date filter wrong. Magento always converts the start/end date in a wrong format (UTC)

If I pull up a sales report and filter shipped by 6/1/16 - 6/30/16 I get a weird result (doesn't match a 3rd party report). When I inspect the final sql query Magento sends to the database I noticed ...
0
votes
1answer
11 views

Show Categories Filter with Custom Attribute

I have to get the list of categories those have a specific attribute assigned, So to achieve this i have created a custom attribute boolean type like this: public function install(...
1
vote
1answer
31 views

How to add AND OR AND conditions in a product collection?

ORIGINAL POST Comment ajouter des conditions ET OU ET dans une collection de produits? comment pourrais filtrer une collection de produit par: (attribut A : condition A And attribut A : condition B) ...
0
votes
1answer
22 views

How to fusion an AND et OR filter/condition in Magento?

how to fusion this instructions: $collection->addFieldToFilter('updated_at', ['from' => $from]) ->addFieldToFilter('updated_at', ['to' => $to]) or $collection->...
0
votes
0answers
60 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 ...
2
votes
2answers
732 views

Duplicate Category Filter Block Causing issue

I have two blocks of the same type on the category page, set in local.xml: <block type="catalog/layer_view" template="catalog/layer/view.phtml"/> When using the category filter an error is ...
0
votes
1answer
17 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
1answer
847 views

How to use FilterPool and Collection using the FilterApplierInterface

Hi fellow Magento developers! I'm currently trying to figure out how to use the FilterPool with classes instead of using it with the etc/di.xml. It should be possible to use filters in a grid ...
0
votes
0answers
11 views

Magento2 Layered navigation doesnt work on sub menu

Im working on a filter module using Magento_LayeredNavigation module. I installed sample data to check my filter i works it doesnt work on someplaces and it works on someplaces. In the picture above ...
2
votes
1answer
2k views

Filters and results not working properly

Filters are not working properly, not all the attributes like 'size' are in the sidebar. Also, when selecting an option to filter on, there are no products found for this selection but in the backend, ...
0
votes
0answers
28 views

Magento 2.4 Custom Filter on product collection, wrong collection size

I created a custom filter to filter products on category pages and in search. Filter itself seems to be correct (two products are visible from origin twelve) but pagination is wrong (total size is ...
-3
votes
1answer
39 views

Magento2: Can we add range slider on product attribute

In current magento2 provide range slider on product attribute "price". I have requirement range slider on Case Diameter.
0
votes
0answers
32 views

Request parameters to filter SQL query using session

I want to filter the Coupon Usage table based on the request parameter passed in querystring. http://localhost/magento2.4/admin/dev_grid/index/index/key/...
1
vote
1answer
3k views

Magento 2 : Add category filter in producy grid

In admin, I want to add column of category and also add category filter in product grid. How to do this? Please help me. Thanks.
0
votes
1answer
5 views

Hide filter options with 0 products in Magento2

I am using Magento 2.3 and need to hide filters in the layered navigation that contain zero products. What files should I modify to complete this?
0
votes
0answers
19 views

How to Apply Custom Filter In Customer Admin Grid With customer attribute in magento 2

i wan to add custom filter with drop down value yes or no is select yes than apply filter and get that that custom attribute value are something if apply no than apply filter and get that value that ...
1
vote
1answer
1k views

Magento sort attribute - get url

For filtering attributes, I use the method geturl() in order to get the required url a client side input type component should use in order to call the server and activate the required filtering via ...
0
votes
0answers
102 views

Orders grid not loading magento 2 (Something went wrong with processing the default view…)

Info: Magento 2.3.5 PHP 7.2 database: mariadb-10.2 Hi guys! Had someone already faced this issue on Magento order sales grid? "Something went wrong with processing the default view and we have ...
1
vote
1answer
1k views

Magento 2: All Products Not Displaying In Admin

I have more than 5K products. Suddenly don't know what happen now on Admin Side In Admin -> Products -> Catalog now it's displaying only 1K products. All Filters are also Reset. Visibility All ...
0
votes
1answer
30 views

Hide simple product on product list page Magento 2

I have simple products and configurable products on my M2 and i would like to hide child of configurable on product list page but still getting them on the filters part. If i set 'Not visible ...
0
votes
0answers
18 views

How can I customize the filter of the product grid on the admin side in order to filter by RANGE

hope you are all good and in great shape. TLDR: How can I filter my product grid on the admin side using a WEIGHT RANGE? I am a newbie in Magento and I have been doing some progress over the last ...
0
votes
0answers
14 views

Error on the Search Bar: Something went wrong with processing the default view and we have restored the filter to its original state

I've mistakenly pasted a large data set I've copied from the excel file on the search bar of the orders. Then, I got this error and it never went back to normal - "Something went wrong with ...
1
vote
1answer
1k views

How do I add a custom dropdown filter in a grid

This is my code: $this->addColumn( $key, array( header' => Mage::helper('core')->__($key), 'index' => $key, 'filter' => 'adminhtml/...
0
votes
1answer
41 views

Custom filter in order grid

I'm trying to add a new field to order grid with custom filter. Right now I managed to make it work, but I want to add my custom filtering rule. I added the column to db_schema.xml and in my module'...
0
votes
2answers
1k views

How to create Search “Textfield” filter in admin grid | Magento 2

I am trying to create Grid search feature based on strings entered in text fields as: This functionality is in some of the default admin grids and few have filter button like this: I wanted to ...
1
vote
0answers
12 views

Using SearchCriteria and FIlterBuilders is it possible to have a nested AND condition inside ORs?

So I know how to create AND condition using the addFilter and how to add OR conditions using FilterBuilder however if I wanted to do do a search like (only using searchCriteria, no direct collection ...
1
vote
0answers
22 views

Filter on custom attributes - elasticsearch - not working on simple products

I have a project where I have a lot of configurable products and I need to make some filters there. I've manage to make the filters and everything related but the issue is that when I apply filters I ...
0
votes
0answers
9 views

Add custom filter in frontent product catalog

I've been looking for a few days to add a filter to the display of products in a category. This filter is a date and should not be visible to users. I managed to do it in version 2.3 but with version ...
4
votes
3answers
2k views

Add Filter to magento 2 category product collection

a similar problem. If i want filter product collection, create plugin for Layer (if use event the result will be the same). The collection is correct and show only 2 products. But the Pagination ...
0
votes
0answers
15 views

Magento 2 - Size filters are not displayed when the configurable product is set to Not individually visible

I have this structure for my products, I have a grouped product that has two configurable products which are configured as Not visible Individually but in the filter section does not show any size, if ...
0
votes
0answers
18 views

Magento 2.3: Filter Purchase Date of Orders by month and year

Default Magento allow we filter purchase date from DD/MM/YYYY to DD/MM/YYYY Now, I want to filter from MM/YYYY to MM/YYYY Please help me.
1
vote
0answers
108 views

How to insert an ui grid with related records in an ui form

I have inserted a grid in a form and I want to filter the listed records by the form id to show all related records. Ho can I set the filter??? Please help me!! Thats my dataprovider: namespace Mcas\...
1
vote
1answer
1k views

Filter a count column in a custom admin grid

I have an admin grid with a count column, everything works fine except the filtering. This is my _prepareCollection() method : protected function _prepareCollection() { $orders = ...
3
votes
1answer
4k views

How to add collection filter to gridContainer in Magento 2?

I need to add a collection filter to my grid. I do few search on Internet but unfortunately it can't resolve my case. I'm using gridContainer instead of usual way. Here is my files: layout.xml <...
0
votes
1answer
37 views

How to add working filters for max_sale_qty and manage_stock in Product grid in Magento 2.3?

I am trying to add working filters for max_sale_qty and manage_stock in product grid in Magento 2.3. I got the columns Max Sale Qty and Manage Stock in product grid to display the records using ...

1
2 3 4 5
15