abdullacm Posted January 28, 2021 Share Posted January 28, 2021 (edited) I have created a module and registered hook hookActionAdminProductsListingFieldsModifier, i could add the ean13 column to the list, but the filter is not working. Can anyone help me or guide me to make the filter working. public function hookActionAdminProductsListingFieldsModifier($params) { $params['sql_select']['ean13'] = array( 'table' => 'p', 'field' => 'ean13', 'filtering' => 'LIKE \'%%%s%%\'' ); } override the twig files and working modules/mymodule/views/PrestaShop/Admin/Product/CatalogPage/Lists list.html.twig products_table.html.twig Thanks, Edited January 28, 2021 by Abdulla CM updated tags (see edit history) Link to comment Share on other sites More sharing options...
abdullacm Posted February 12, 2021 Author Share Posted February 12, 2021 anyone has any idea how to do this ? Link to comment Share on other sites More sharing options...
AndyGerhard Posted March 2, 2021 Share Posted March 2, 2021 Sounds good. i am looking for that. How i can install it? Can we make a tutorial for that together? Link to comment Share on other sites More sharing options...
zolwix Posted October 7, 2021 Share Posted October 7, 2021 (edited) I added to hookActionAdminProductsListingFieldsModifier custom fielt like @Abdulla CM. I have data on product list tabele in admin but filter input not working. If i write names and submit filter in custom column, nothing happen. Please anyone can help? public function hookActionAdminProductsListingFieldsModifier($params) { if (isset($params['sql_select'])) { $params['sql_select']['pxl_supplier'] = array( "table"=>"p", "field"=>"pxl_supplier", "filtering"=>"LIKE '%%%s%%'" ); } Edited October 7, 2021 by zolwix (see edit history) Link to comment Share on other sites More sharing options...
zolwix Posted October 9, 2021 Share Posted October 9, 2021 I found a solution - need to add a new column filter variable in the file /src/PrestaShopBundle/Entity/AdminFilter.php to 2 function: getProductCatalogEmptyFilter () and sanitizeFilterParameters () Now searching, paging and sorting with the new field search results works fine. Here you will find additional information with fles to download https://github.com/FuenRob/Modules-Prestashop-1.7/issues/1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now