Combine first name and last name to Full name? Only 1 custom field Full name. I'm newbie. Help me
Thank you very much
Do you want to run query to get first name + last name as full name?
For query something like this
or combine to variable first name + last name?
For combine variable something like this
For query something like this
Code: Select all
(SELECT CONCAT(c.firstname, ' ', c.lastname) FROM " . DB_PREFIX . "customer c ) AS fullname,
For combine variable something like this
Code: Select all
$fullname = $customer_info['firstname'] . ' ' . $customer_info['lastname'];
And if you need to change it in admin order information page you can edit lines 52 to 57 in the file admin/view/template/sale/order_info.tplphamxuanvinh2110 wrote: ↑Sat Jun 03, 2017 3:23 pmCombine first name and last name to Full name? Only 1 custom field Full name. I'm newbie. Help me
Thank you very much
Chris, Opencart Developers and Programmers,
Opencart Developers Opencart Programmers
https://www.chrisranjana.com
I hide some "last name" in register page, checkout page... but when customer login and edit imformation, it notice error, because lose field "last name" - required.
(SELECT CONCAT(c.firstname, ' ', c.lastname) FROM " . DB_PREFIX . "customer c ) AS fullname, => error.opencartboost wrote: ↑Sat Jun 03, 2017 3:35 pmDo you want to run query to get first name + last name as full name?
For query something like thisor combine to variable first name + last name?Code: Select all
(SELECT CONCAT(c.firstname, ' ', c.lastname) FROM " . DB_PREFIX . "customer c ) AS fullname,
For combine variable something like thisCode: Select all
$fullname = $customer_info['firstname'] . ' ' . $customer_info['lastname'];
full query extract???
Hide last name field in all page. from register, check out, admin page, ... and it dont required field. combine first and last into Full name. only field
Attachments
lastname.png (133.45 KiB) Viewed 4244 times
As per replies, you can easily combine them for display purposes but it is not recommended for database because some payment gateways require first name and last name separate,phamxuanvinh2110 wrote: ↑Sat Jun 03, 2017 3:23 pmCombine first name and last name to Full name? Only 1 custom field Full name. I'm newbie. Help me
Thank you very much
If you combine them you will have to pass a blank field and you are likely to have payments fail to authorise.
I used to Ajax quick checkout, so a few profile customer is hide, but in admin order is not hide. so every edit customer's order, I must write full profile. How can I fix?
Who is online
Users browsing this forum: No registered users and 435 guests