Questions tagged [filter]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Get Latest Entry For Duplicate Rows In Collection

I currently have a logs table which has the following rows which use the same order_id: log_id order_id user action 2410 1001318004 test1 Declined 2409 1001318004 test1 Declined Inside my app/code/...
-3
votes
1answer
158 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
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 = ...
11
votes
9answers
33k views

Magento 2 Get category id using category title

I would like get category id by only using category title by using this kind of function. ->load($categoryTitle, 'title') ->getId(); Use case: Get category id by title and put id data to array ...
4
votes
3answers
3k 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 ...
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 ...
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 ...
0
votes
0answers
15 views

Add Horizontal & Vertical Layered Navigation

I have a requirement in my project where I need to show both horizontal & vertical layered navigation in product listing page. I have tried to achieve it but facing issue of Illegal state I have ...
0
votes
0answers
13 views

Magento2 add filters for My Orders section in frontend

Magento2 How can I add custom filters on My Orders section Filters By LAST 30 DAYS & LAST 6 Months
5
votes
2answers
8k views

Get product collection by store ID on Magento 2.2

I want to get all products by store ID, so I'm doing it like this return $this->productCollection->addStoreFilter(27); productCollection is Magento\Catalog\Model\ResourceModel\Product\...
2
votes
1answer
3k views

To add category filter in Product grid magento2

I have tried to add Category column in Product grid admin area.I have added it successfully by below code. <column name="category" class="Chilly\Productsgrid\Ui\Component\Listing\Column\Category"&...
0
votes
0answers
8 views

How to filter Dataprovider results using OR conditions

I am looking for a way to filter orders for a grid based on one of 2 conditions: Order has a status of "processing_consultation" OR Order has an order source ID of 9 So I currently have ...
0
votes
1answer
26 views

Frontend Grid Filters not Working in magento 2.4.2

I am getting this after a click on the Apply Filters Button in the frontend grid. Uncaught TypeError: $(...).notification is not a function at UiClass.apply (filters.js:203) at HTMLButtonElement. (...
3
votes
1answer
3k 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 ...
7
votes
2answers
1k views

Get empty result when trying to get filterable attribute for particular category

I need to retrieve all filterable attributes for category. I'm using that snippet: $category = Mage::getModel('catalog/category')->load($categoryId); $layer = Mage::getModel('catalog/layer'); $...
0
votes
0answers
18 views

Admin Grid Filters Expanded on the base of Configuration

I am trying to create the configuration to expanded Magento 2 all grids filters, I overrider these 2 files its work, var config = { map: { '*': { 'Magento_Ui/js/grid/filters/...
0
votes
0answers
24 views

The code looks wrong but works correctly. Is it possible to optimize it and make it more logical?

I have a knockout component that shows or hides my items by tag. I do not work well with js and knockout is new to me, I would like to improve my filtering logic so that it works correctly and locally....
0
votes
0answers
19 views

How to filter array and change data on front end KO

I using knockout to create a list with my custom collection data. <div data-bind="scope: 'myData'"> <!-- ko template: getTemplate() --><!-- /ko --> <script type=&...
0
votes
1answer
42 views

How to change HTML of Categoty Page in Magento 2?

how can i change the layout of Category page in Magento 2 Like to change some HTML in category page. i want to show product in full width and want to show price filter just above of product listing ...
0
votes
2answers
1k 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.....
0
votes
0answers
24 views

Filter Grid with Comma Separated Values - Magento2

I'm working on a module where I need to filer store view which is stored as comma-separated values in a custom table. I tried solutions mentioned in Magento 2 -Admin Grid Select filter with comma ...
0
votes
1answer
15 views

Custom Sort options for Catalog Dropdown

I created: di.xml on app/code/Filter/Sorting/etc <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
1answer
351 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 ...
0
votes
0answers
19 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
0
votes
1answer
17 views

Only display products with stock when filter is selected

guys so recently I noticed that when I select a filter, for example, the size M some of the products even though they have the size M some of them are out of stock and I was wondering if it's possible ...
2
votes
1answer
2k 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
8 views

Magento 2 | Enable filters on collection factory programmatically

In my phtml file that I recalled in a cms page I took the entire collection of products, filtered it and finally recalled it. Everything works fine but I can't get the navigation filters like they are ...
11
votes
2answers
13k views

NotNull not working with AddFieldToFilter in Magento 2

I have following code to filter out rows on a column that is null and it is working ->addFieldToFilter( 'ep_image', ['null' => true] ) and I have another code to ...
0
votes
0answers
13 views

Magento 2 | Add Filters of Layered Navigation to custom collection

I asked this question because I would like to explain myself better. In my CMS page I have recalled my custom collection in this way: $blockProductColl = $block->getLayout()->createBlock(...
0
votes
0answers
33 views

Add default date from filter to UI Component grid in Magento 2

I have a custom grid created in the backend for a Magento 2.4.1 instance. Everything is working properly (filters, sorting, etc.), but I have one more request that seems to be more complicated. I have ...
1
vote
3answers
4k views

How to Remove Categories Filter from the Sidebar

in Magento 2.1, I would like to have the Category filter removed from the sidebar when in the shop category page, leaving the price filter untouched. So far I have tried unsetting the category as ...
0
votes
2answers
976 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->...
1
vote
1answer
983 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 ...
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 ...
0
votes
2answers
929 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
2k 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 ...
0
votes
1answer
23 views

How to add Text Input Filter to custom module (hidden column)

I am trying to add a custom filter to a custom module in admin grid, however I do not want that column to be shown therefore I have tried both ways by adding a column and making visible field to false ...
0
votes
0answers
13 views

Magento 2: Need to add some additional product in filter result that is not part of the filter

I want to always show some of the product which is not part of selected filter. It means customer selects any filter then it will showing all filterable products but I also want some extra products ...
0
votes
0answers
8 views

How to add filters in custom grid created using block?

I have created a custom grid using block i am trying to add filters to the grid from last two days but unfortunately i am unable to achieve that can someone please explains step by step how to add ...
2
votes
1answer
3k 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, ...
1
vote
1answer
84 views

Admin Grid is Showing Wrong filter count Magento 2.4.2

I had updated the magento version 2.3.5 to 2.4.2, in the admin when i tried to search the configurable product alone it shows the wrong product count.
0
votes
0answers
9 views

How to add layered navigation in bestseller product page

I want to add layered navigation in bestseller product page in magento2.4 how can i add this without using any extension
0
votes
0answers
12 views

Is it possible to make the magento filter load a phtml code inside?

Staff in magento 2, in 2-column layout, in the first column there is a value filter and in the second column the products. Is it possible to make the filter load inside the product column?. I need the ...
1
vote
2answers
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/...
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
2answers
1k views

How to add Store View Filter in Custom Listing Grid In Magento 2.X?

I have created a custom module in my Magento 2.3.1 site. The module has Admin Listing Grid and Add/Edit view. My site is multi-store site, Now I want to display "Store View" filter in listing grid at ...
1
vote
4answers
1k views

How to Add Date with Time in Orders Filter : Magento 2 Admin Section

In M2 Admin I want to filter my orders with date and time, by default date only in purchase filter section. How to add date and time here. Purchase Date with time already show in the order grid!. How ...
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
27 views

Magento 2 multi-region filter

Does anyone know of a module with a multi-range filter, (with two positions to filter) that is free?, I found a filter but it only works with the value of the products. I needed it to work with other ...
-1
votes
1answer
44 views

I want filter for Most Viewed Products in Magento 2 in Category Page

I want to make a custom filter for Most Viewed Product on Category Page in Magento 2. I have used this code app/code/Hlcategory/Filter/Plugin/Catalog/Block/Toolbar.php public function ...

1
2 3 4 5
16