- Posts: 132
- Thank you received: 3
How to add Telephone number on Registration
- alexmartin
-
Topic Author
- Offline
Less
More
4 years 2 months ago - 4 years 2 months ago #343464
by alexmartin
How to add Telephone number on Registration was created by alexmartin
-- HikaShop version -- : 4.6.0
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.0.21
-- Browser(s) name and version -- : chrome
How do I add a telephone number on the registration form so it will be synchronized with Joomla 4 User profile?
I have used your recommendations such as: "Turn back on the "ask address on registration" option of the configuration.
Then, go in the menu Display>Custom fields and disable all the address fields except the telephone one and you'll have what you want. "
but i need telephone number displayed in Joomla user.
2) Is there any snippet code i can use from Hikashop to display Telephone number and also user Name and Username on a front end? _ because that is my goal.
Alex
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.0.21
-- Browser(s) name and version -- : chrome
How do I add a telephone number on the registration form so it will be synchronized with Joomla 4 User profile?
I have used your recommendations such as: "Turn back on the "ask address on registration" option of the configuration.
Then, go in the menu Display>Custom fields and disable all the address fields except the telephone one and you'll have what you want. "
but i need telephone number displayed in Joomla user.
2) Is there any snippet code i can use from Hikashop to display Telephone number and also user Name and Username on a front end? _ because that is my goal.
Alex
Last edit: 4 years 2 months ago by alexmartin.
Please Log in or Create an account to join the conversation.
4 years 2 months ago - 4 years 2 months ago #343466
by nicolas
Replied by nicolas on topic How to add Telephone number on Registration
Hi,
In the HikaShop user synchronization plugin settings, there is a setting you can activate to display the custom fields of the table "user" on the Joomla user profile edit page of the frontend.
So that means you can't use the addres_telephone field for that as that's an address field, not a user field.
But you can disable that field, and instead create a new custom user field for that.
In the HikaShop user synchronization plugin settings, there is a setting you can activate to display the custom fields of the table "user" on the Joomla user profile edit page of the frontend.
So that means you can't use the addres_telephone field for that as that's an address field, not a user field.
But you can disable that field, and instead create a new custom user field for that.
Last edit: 4 years 2 months ago by nicolas.
Please Log in or Create an account to join the conversation.
- alexmartin
-
Topic Author
- Offline
Less
More
- Posts: 132
- Thank you received: 3
4 years 2 months ago #343521
by alexmartin
Replied by alexmartin on topic How to add Telephone number on Registration
Yes, i made custom User filed, and it is displayed on the Hikashop User page. Not a problem. But it does not display on the Joomla User profile.
1) Is it possible to to display the number on the Joomla user profile?
2) Is there any snippet code I can use to display that field on the front end on Joomla pages?
Looking forward
Thank you
1) Is it possible to to display the number on the Joomla user profile?
2) Is there any snippet code I can use to display that field on the front end on Joomla pages?
Looking forward
Thank you
Please Log in or Create an account to join the conversation.
4 years 2 months ago #343523
by nicolas
Replied by nicolas on topic How to add Telephone number on Registration
Hi,
As I said, it will display on the user profile edit page if you activate the corresponding setting of the HikaShop user synchronization plugin.
So no code required.
Now, you can display the value of a custom user field quite easily anywhere on your website with such code:
Where xxx is the column name of the custom field.
As I said, it will display on the user profile edit page if you activate the corresponding setting of the HikaShop user synchronization plugin.
So no code required.
Now, you can display the value of a custom user field quite easily anywhere on your website with such code:
Code:
// load hikashop
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php'))
return;
$user = hikashop_loadUser(true);
echo $user->xxx;
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds