Default user value for the first buy user

  • Posts: 252
  • Thank you received: 1
5 years 8 months ago #304744

-- Joomla version -- : 4.0.3
-- PHP version -- : 7.1

Hi,
We have created some custom field in our joomla site, when user register, we will collect his/her phone and address.infomation.
What shall I do to bring in user name, address and phone number as default value to the address form for the first time check out user ?
Thanks is advance

Best Regards

Last edit: 5 years 8 months ago by twscott.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 8 months ago #304747

Hi,

I'm not following you. There are already phone and address custom fields by default in HikaShop. You can find them in the menu Display>Custom fields of HikaShop after you installed it.
Reading between the lines of your message, I'm supposing that what you're asking is actually that you have Joomla profile fields for your Joomla user accounts and you want to prefill the address fields of HikaShop with these, is that correct ?
To do that, you need to develop a plugin to prefill these fields when displaying the address creation form.
Rather than doing that however, I would rather recommend that you don't use the Joomla fields and don't use the Joomla registration form, but instead, that you activate the "Redirect Joomla registration to HikaShop" plugin via the Joomla plugins manager, in order to use the HikaShop registration form instead of Joomla's. That way, it will already have the address fields during the registration and customers won't have to fill in their address twice as it will directly be stored in HikaShop's custom address fields.

The following user(s) said Thank You: twscott

Please Log in or Create an account to join the conversation.

  • Posts: 252
  • Thank you received: 1
5 years 8 months ago #304794

Thanks for helping me but I am not sure if I doing this right.
I turn on the plug_in and put in the menu Itemid for registration, and the registration form is now different, but it only ask for user_name, password and email, no address fields as you mentioned. What could be possibly wrong?
By the way, if I want more of the custom fields, can I create them from hikashop\Display\Custom fields\Address ?
Thanks again

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 8 months ago #304796

Hi,

Supposing that it is the hikashop registration form, if you don't see the address fields on it, it's probably that you have the "Ask address on registration" setting deactivated in the HikaShop configuration.

And yes, you can create more fields there.

The following user(s) said Thank You: twscott

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum