Luigi Donato Posted July 10, 2022 Share Posted July 10, 2022 Greetings, I would need to add a column with customized information in the backoffice product list. Searching in the forum, the search tool did not give me relevant results, on Google it did, but I'm not sure about the reliability of the information, the points on which everyone seems to agree are that you have to use: - hookActionAdminProductsListingFieldsModifier - $params ['sql_select'] - $params ['sql_table'] But I would like to understand better before starting to work on it, the purpose is to display personalized data, collected by this module: Link to comment Share on other sites More sharing options...
Janett Posted July 10, 2022 Share Posted July 10, 2022 Here an example: https://github.com/Matt75/displayproductmanufacturer 1 1 Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 11, 2022 Author Share Posted July 11, 2022 (edited) Ok, thank you very much, this module is very useful to me and it is structured in a simple way. I tried to edit like this and work, thank you! $params['sql_select']['id_product'] = [ 'table' => 'p', 'field' => 'id_product', 'filtering' => ' %s ', ]; $params['sql_select']['manufacturer_name'] = [ 'table' => 'employee_actions', 'field' => 'employee', 'filtering' => 'LIKE \'%%%s%%\'', ]; $params['sql_table']['employee_actions'] = [ 'table' => 'employee_actions', 'join' => 'LEFT JOIN', 'on' => 'p.`id_product` = employee_actions.`id_product`', ]; However if there are more lines, the product is duplicated, tripled, etc. while I would like it to be in a single row and enter the various results in the same cell. Edited July 11, 2022 by Luigi Donato (see edit history) Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 11, 2022 Author Share Posted July 11, 2022 (edited) Another thing I can't change is manufacturer_name, of course I changed it in the twig files too. Edited July 11, 2022 by Luigi Donato (see edit history) Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 16, 2022 Author Share Posted July 16, 2022 No solution to have details in 1 line? Link to comment Share on other sites More sharing options...
Janett Posted July 16, 2022 Share Posted July 16, 2022 Probably because there more than one results on your table employee_actions with theses criteria, so you have to improve it to have only one result to have only one row. 1 Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 19, 2022 Author Share Posted July 19, 2022 On 7/16/2022 at 12:33 PM, Janett said: Probably because there more than one results on your table employee_actions with theses criteria, so you have to improve it to have only one result to have only one row. Yes, that's the problem, I just don't know how to retrieve all the product's rows in a single row, so that I can see all the information in the product row Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 28, 2022 Author Share Posted July 28, 2022 No solution 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