massycroft Posted March 20, 2017 Share Posted March 20, 2017 Hi, I need to make display full first name and full last name in the 'Customer' column present in the section Orders>Orders. Currently, as default it shows me abbreviated first name and full last name, e.g.= M. Jackson instead of Michael Jackson. How can I do to get it? Thank you very much in advance. Max. Link to comment Share on other sites More sharing options...
massycroft Posted March 20, 2017 Author Share Posted March 20, 2017 Solved, line 62 in controllers/admin/AdminOrdersController.php has to be rewrite as follows: CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`, Link to comment Share on other sites More sharing options...
Adeko.nl Posted March 20, 2017 Share Posted March 20, 2017 Hi Massycroft, You need to edit AdminOrdersController.php to accomplish this. This file can be found in controllers -> admin -> AdminOrdersController.php Change: CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, to: CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`, Don't forget to empty your cache under Advanced parameters -> Performance. 2 Link to comment Share on other sites More sharing options...
meclarn Posted March 1, 2018 Share Posted March 1, 2018 Just a follow up on this thread. In Prestashop v. 1.6.1.18. I had to make the changes to both AdminOrdersController.php and AdminOutstandingController.php in order for this to work. 1 Link to comment Share on other sites More sharing options...
N N Posted March 30, 2020 Share Posted March 30, 2020 Thank you. It was useful to me. Link to comment Share on other sites More sharing options...
CyberPepe Posted May 28, 2020 Share Posted May 28, 2020 Is working at PS 1.7.6.5 but I changed both files with this code, because an error occurred and a dot needed to be removed: CONCAT(LEFT(c.`firstname`, 10), \' \', c.`lastname`) AS `customer`, 2 Link to comment Share on other sites More sharing options...
safa Posted June 9, 2021 Share Posted June 9, 2021 Hello, just a note for 1.7.7.x search a lot time for find this almost all admin files chanced src/Core/Grid/Query/OrderQueryBuilder.php find private function getCustomerField() { return 'CONCAT(LEFT(cu.`firstname`, 1), \'. \', cu.`lastname`)'; } replace private function getCustomerField() { return 'CONCAT(cu.`firstname`, \' \', cu.`lastname`)'; } bests... 2 3 Link to comment Share on other sites More sharing options...
Skafander Posted May 20, 2022 Share Posted May 20, 2022 Hello, solution of @safa works in 1.7.7.x but you are unable to search by full name and surname. Does anyone have a clue how to get it work? Link to comment Share on other sites More sharing options...
pShark Posted March 17, 2023 Share Posted March 17, 2023 On 5/20/2022 at 1:04 PM, Skafander said: Hello, solution of @safa works in 1.7.7.x but you are unable to search by full name and surname. Does anyone have a clue how to get it work? I agree with the question, does anyone know how to make it searchable by firstname as well? Link to comment Share on other sites More sharing options...
pShark Posted March 20, 2023 Share Posted March 20, 2023 That solutions works for me, editing getCustomerField function, thanks all!! 1 Link to comment Share on other sites More sharing options...
tayfun476 Posted May 31, 2023 Share Posted May 31, 2023 On 6/9/2021 at 4:38 AM, safa said: Hello, just a note for 1.7.7.x search a lot time for find this almost all admin files chanced src/Core/Grid/Query/OrderQueryBuilder.php find Hi, In the getCustomerField() method, I have modified the CONCAT function to limit the lastname field to 20 characters using the LEFT() function. This change ensures that long customer names won't affect your list by cutting off the displayed name to a specified character count. Link to comment Share on other sites More sharing options...
presta-dyr Posted October 28 Share Posted October 28 I have created a free module that displays the full customer name (version 1.7.7 and above). /Kjeld 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