Customer name incomplete on order confirmation

2019-09-20 15:06发布

问题:

Came across the following during a project: Customer fills out his/her name during checkout: Firstname Middlename Lastname

The confirmation email sent contains incomplete name in the form of "Firstname Lastname" on the first sentence of the confirmation

I looked at the mail templates and the function order.getCustomerName() does not seem to retrieve all the information.

回答1:

You can set this in the customer address settings of admin.

Admin → System → configuration → Customer Configuration → Name and Address Options → Show Middle Name (initial).

Showing more than the initial in the templates is something you will have to investigate further. In the UK we keep the form simple and don't ask middle names.