Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
487 views

In my data-provider addFieldtoFilter() is not working with url param

I have made a grid in admin that is supposed to return a filtered collection based on a URL parameter lesson_id. DataProvider: <?php namespace VendorName\ModuleName\Ui\DataProvider\Participants; ...
luitzen feenstra's user avatar
0 votes
0 answers
502 views

Product Collection With Duplicates (On Purpose) For Admin Grid How?

I need to load a product collection that has repeated products in it. I get this error when trying to load a product collection with repeated products: Item (Magento\Catalog\Model\Product\Interceptor) ...
Kevin Chavez's user avatar
0 votes
1 answer
587 views

Magento 2 Product grid collection filtering on programmatic Qty column values

I am programatically updating the qty column values for configurable products. Sadly, the grid filter for this column doesn't work with new values. The underlying catalog product collection joins with ...
Johny Boy's user avatar
1 vote
1 answer
589 views

Create filterable admin grid from external database table

As the title says - I am trying to create an admin grid from an external database-table. I was able to create one with an ui_component and some dirty tricks in my data provider - but the problem is, ...
Mario's user avatar
  • 498
1 vote
1 answer
968 views

How to filter your admin grid collection based on certain condition in Ui component xml file

I want to filter my Grid based on condition that only active entries should be visible on the grid and not all entries from the table I am using ui component to create grids
Smita Kagwade's user avatar
0 votes
0 answers
222 views

How to add where clause or join condition to the shipment grid using ui component?

I managed to display the shipment core grid using ui component on another magento admin page. Right now I would like to filter it, to add more where clauses and join it MAYBE with other tables. This ...
Attila Naghi's user avatar
  • 4,093
2 votes
3 answers
2k views

Magento2 Need to filter grid when value is entered in search box, the column of the data is from another table

I have added 4 columns in the grid as displayed in below screenshot. For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below) ...
Arjun's user avatar
  • 3,606
0 votes
0 answers
169 views

Magento 2 create new tab and add customer grid collection on product add/edit page in admin

I am using magento 2.3 and i want add custom tab in Product edit page on admin and add grid collection of customer in custom tab. So any one know How i can do that. Thank you.
virupatel's user avatar
2 votes
1 answer
252 views

Order admin grid by values in another collection

I have a module, in this there is a field which contains the id from customer table. In my admin grid listing I show the name of the customer, not the id. When i short this grid by the field, the ...
Gabriel Fernandes's user avatar
2 votes
3 answers
5k views

Collection not loading in Ui Component Admin Grid - stuck spinning

I have a basic CRUD repository setup, however when I try to go to the Admin Grid UI Component, the spinner just spins and nothing loads. No errors displayed in any of the logs either. When I inspect ...
Erik B's user avatar
  • 165
2 votes
1 answer
4k views

Magento 2: How to add where clause in grid collection

I am working on a module, where I have 2 custom tables. One is of all customer who have added product to First table(one customer can add multiple tables) and that first table is displayed on grid. ...
Adarsh Shukla's user avatar
2 votes
1 answer
3k views

how to retrieve Coupon Code by rule Id on Checkout Success Page?

I have coupon rule collection created at admin side and displaying rule names in the system configuration of the custom module. Actually, I wanted to get coupon code of a cart rule that has been ...
Ajwad Syed's user avatar
  • 1,591
1 vote
0 answers
528 views

Pagination not working in custom grid collection

I have created the grid with custom collection filter grid displayed proper but pagination not working. Any have an idea about the same. Please find below my code <?php namespace Abc\Xyz\Block\...
Sagar Dobariya's user avatar
4 votes
1 answer
2k views

Filtering grid by using filter_url_params is not working

I added a grid to a ui_component form and I want to use an Url-parameter to filter the content of the grid. Herefore I added the 'filter_url_params' in my listing: <dataSource name="...
Dr. Christian Kusche's user avatar
2 votes
1 answer
629 views

How to load filter state for admin grid?

I'm looking for a way to get the state/settings for the order_sales_view grid on a in a php class. I want to load the grid and the filter state to use for selecting previous and next order according ...
TNordkvist's user avatar
0 votes
2 answers
1k views

Filter Custom Grid Collection

I am trying to filter my collection from my custom table using _initSelect method in class Collection in namespace Anshu\Custom\Model\ResourceModel\MyData protected function _initSelect() { ...
Anshu Mishra's user avatar
  • 9,010
0 votes
1 answer
7k views

Magento 2 How to create options array for use in backend grid

all. Fairly new in Magento development. I am trying to get a dropdown select element in UI grid with values read from database working. Currently I have it working in a non-preferred manner with the ...
Jo-Anne's user avatar
  • 43
3 votes
0 answers
5k views

Magento 2: Duplicate key-sequence unique identity-constraint 'uniqueVirtualType' fatal error while di:compile

When i run php bin/magento setup:di:compile it gives me below error [Magento\Framework\Exception\LocalizedException] Invalid Document Element 'virtualType': Duplicate key-sequence ['Custom\...
Jackson's user avatar
  • 9,969
1 vote
1 answer
2k views

How to modify/preprocess data before displaying in admin grid in Magento 2

I'd like to make some modifications before displaying it in admin grid. For now all what I want to do is just simply replace 0 and 1 in a column with Yes/No. There are a two ways that come to my mind. ...
Luke's user avatar
  • 802
4 votes
2 answers
2k views

Magento 2 and filtered collections

I have a collection of users and I want to create a backend grid to show only some user depending on a filter. For example I want to show all the users in my table whith age greater than 18. I ...
Phoenix128_RiccardoT's user avatar
3 votes
2 answers
5k 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 <...
Toan Nguyen's user avatar
  • 3,069
3 votes
1 answer
2k views

Magento2 how to override collection

I want to build a grid that show information from "directory_country_region" table but show only for "country_id" with id = "TH". I'm using UI component & Magento\...
HungDQ's user avatar
  • 812
2 votes
4 answers
3k views

Magento 2: add fields to products collection

Ok so I'm trying to implement a simple export to CSV massaction on the Magento 2 Catalog products grid. I've successfully created the mass action item, as well as the admin controller. I am able to ...
Raphael at Digital Pianism's user avatar
14 votes
5 answers
25k views

To add default filter to grid in Magento2?

I have created one custom module with title & status field attribute in admin grid. Grid collections in module_test_grid_block.xml <arguments> <argument name="id" ...
DRAJI's user avatar
  • 855