Jump to content

[SOLVED] How to show customer name using first name in Admin order list


cayrol272
 Share

Recommended Posts

Hi,

 

I'm still new using prestashop. Attached picture was an order list on Admin side. My problem is customer's names show second name instead first name. It give me difficult to look for my customer because in my country we address people using first name.  

 

Could someone help me, how to show customer name using first name? Which template should I looking for? or I need to modify controller?

 

Thank you.

post-443158-0-52121000-1378536262_thumb.jpg

Share this post


Link to post
Share on other sites

You have to edit AdminOrdersController.php

 

At line 45, you'll find part of a query

CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,

Change it to

CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`,
  • Like 8
  • Thanks 1

Share this post


Link to post
Share on other sites

I marked this thread as [sOLVED]

@cayrol272 you can also mark own threads as solved, here is the instruction:

 

 

 

[sOLVED] Topic
If, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.
Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.

 

 

btw. welcome on board! :)

Share this post


Link to post
Share on other sites

  • 1 year later...
  • 11 months later...

Change the following line

 

CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,

 

to

 

CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`,

 

In AdminOrdersController.php ;)

 

I'm using ps version 1.5.6.2. I tried using this suggestion but it did not change anything. Hoping to be able to display the complete first and last name. Any ideas why it didn't work?

Share this post


Link to post
Share on other sites

  • 3 months later...
  • 1 year later...

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More