Custom field user registration

  • Posts: 8
  • Thank you received: 0
9 years 9 months ago #185168

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.7
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : No error

I have hikashop user registration turned on. When user registers the default fields are (Name,username,Email,password and confirm password). I wanted to add only one field mobile number. How can i achive this? I don't want to activate user address, which has a long list of all items. I just want to add one field mobile number. How to do this?

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
9 years 9 months ago #185171

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.

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

  • Posts: 8
  • Thank you received: 0
9 years 9 months ago #185320

I did what you have mentioned.
1. Turn back on the "ask address on registration" option of the configuration
2. menu Display>Custom fields and disable all the address fields except the telephone one -http://prntscr.com/5oxiu7
3. However in the result i have complete address -http://prntscr.com/5oxjjd

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
9 years 9 months ago #185346

Hi,

I don't see how that's possible.
Disabled fields should not display, like they don't for anyone else.
Look at the middle name custom field. It is not published and you don't see it. So why would it work for this one and not the others ?
No, you must have something on your website.
Either you're not looking at the same website, or your have some caching preventing you from seeing the changes, or your template has some view overrides preventing you from seeing the changes (try if it helps with another template).

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

  • Posts: 8
  • Thank you received: 0
9 years 9 months ago #185404

Thanks it was a cache issue...
prntscr.com/5p4lgn

It is working fine now. However there are two issues
1. The mandatory field asterisk is too far and is not apparent
2. There is this Address information , is it possible to remove the address information header or change it.

Also i make contact number mandatory now , what happens to the users who are already registered with us? Will the system ask them to fill the details next time they login or they will not be asked.
I would prefer not bothering existing users with their contact number

Regards
Anil

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #185415

Hi,

1. It seems to be a template issue, a link to the page could help us ;)
2. You can do a translation override on the key: "ADDRESS_INFORMATION".
www.hikashop.com/support/faq.html#tran
3. The system will not ask them to fill the details. They will be asked only if they edit their current informations.

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

  • Posts: 8
  • Thank you received: 0
9 years 9 months ago #185552

Xavier , thanks for your help. Everything is in place.
Except the *
Below is the link:
dev.meraskill.com/component/hikashop/user/form?Itemid=157

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #185572

Hi,

You have to edit/remove the css property on the class ".hikashop_field_required" in the hikashop frontend css file.
This file can be edited via the menu Configuration > Display > CSS > Frontend css file.

The following user(s) said Thank You: anilban

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

  • Posts: 51
  • Thank you received: 1
8 years 7 months ago #232003

I'm also in need similar feature. I unpublished the address fields which I don't want displayed on the registration page & its no longer displaying. My present challenge with this method is, those fields no longer displays in the user Cpanel when the user is logged on & therefore when a customer orders an item & wants to Checkout, they are not able to fill in their billing & shipping address in the checkout page becasuse the field is turned off.
Pls help me with another method to make this possible.
In summary, what I need is
I need all other address fields excluding the phone no field turned off in the registration page so that I can send a welcome message to my new user via SMS. At the same time, I want the fields to be available in the user CPanel or Checkout page where their address & name will be required.
Expecting your reply. Thanks

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
8 years 7 months ago #232005

Hi,

Instead of unpublishing the custom address fields, you should turn off the setting "Ask address on registration" of the HikaShop configuration.
That way, you would still not get the custom address fields on the registration form, but you would still have them during the checkout for the billing/shipping address.

For the phone, I would recommend to disable the custom address field for it, and instead create a custom user field so that it would be attached to the user and not the address and thus it would still display on the registration form and could be used for the sending of the SMS.

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

  • Posts: 51
  • Thank you received: 1
8 years 7 months ago #232059

Yea, thanks for your reply.
That's the setting I've been using for the past 8 months. My only challenge with it is that Acysms only uses phone no in address field for sending user registration Sms.
Incase you know any work around for it, I'd appreciate if you can help me with it.
Also, is there a way I can auto update the address phone_no field with the custom user phone_no field I created via Cron. The last time I tried doing it, I lost some of the phone no's.
Expecting your reply. Thanks

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
8 years 7 months ago #232087

Hi,

One thing you should do is contact the AcySMS team and ask them to support custom user fields.
It shouldn't be difficult for them to support them as they already support custom address fields and it makes sense to do that.
Updating regularily the telephone number in the addresses with the telephone number in the user would be possible with such MySQL query (where you replace #__ with the prefix of the tables and the custom user field with the phone number is called user_telephone ):
UPDATE #__hikashop_address AS a, #__hikashop_user AS u SET a.address_telephone=u.user_telephone WHERE a.address_user_id=u.user_id;

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

  • Posts: 51
  • Thank you received: 1
8 years 7 months ago #234071

Okay, thanks Nicholas. Pls help me add a conditional statement to the code above
What i mean is, For cases where the Address Field Phone No Column is already filled with a phone number, I'd like this query to skip those columns. It should only update empty Columns.

Also, just to confirm again. Is it a double underscore i will use after filling my table prefix before the hikashop like the one i bracketed here (__)hikashop_address?
Sorry for troubling you but i'm not good at coding but will really love to learn it. Expecting your reply. Thanks

Last edit: 8 years 7 months ago by Lordtech.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
8 years 7 months ago #234075

Hi,

If you don't want to update it if there is already something in it, just add a condition in your MySQL query, like that:
UPDATE #__hikashop_address AS a, #__hikashop_user AS u SET a.address_telephone=u.user_telephone WHERE a.address_user_id=u.user_id AND a.address_telephone !='';

And no, you just have something like rg7w_hikashop_address if rg7w_ is your Joomla table prefix. So only one underscore normally.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum