Telephone Number Filed

  • Posts: 11
  • Thank you received: 0
9 years 6 months ago #202497

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.37
-- Browser(s) name and version -- : Chrome

Hi,

At the checkout, the user will register to complete the checkout. One of the fields is "Telephone Number" which is standard that comes with Hikashop Business version. The problem is this field is a TEXT field and users can input a text instead of number. I am getting many users that they are registering but they do not give a real phone number. They type for example (camillanugan8827). I need to control the telephone number field to force people only to input a digit number instead of a text.

On the back-end, I didn't find any option that can makes the text field only a digit. Please, see the attached image for current configuration for Telephone field. Any idea how to that?

Thanks,
RAID

Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 6 months ago #202502

Hi,

There is already such control by default on that field to only allow numbers in the field. So I'm surprised that you say that you can enter normal text in it.
Maybe there is a javascript error on the page preventing the check to work properly ?

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

  • Posts: 11
  • Thank you received: 0
9 years 6 months ago #202596

Hi,

Okay. How can I find the javascript that it might not working correctly? Is there any plugin that it might be disabled that control it?

Thanks,
RAID

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 6 months ago #202627

Hi,

Such javascript error could happen because of an error in another extension of your website, or a conflict between two extensions on your website.
If you look at your browser's javascript error log on the page with the issue, you might see the error message.
But the best would be that you give a link to the shop so that we can look at the issue and analyze it.

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

  • Posts: 11
  • Thank you received: 0
9 years 6 months ago #202675

Hi Nicolas,

In the Chrome, I am on the registration page. right click and "inspect element", there are no warnings or errors. Below is the link to the registration page which you can see the Telephone field accept text. Take a look and see if there is any conflict on javascript.

www.mmfoodclub.com/tucson-halal-restaurant/user/form

Thanks,
RAID

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 6 months ago #202678

Hi,

I've done a test but the check worked : take.ms/VINVE
So I've checked with your text camillanugan8827 and indeed it let the user continue. That's because the user entered some numbers and so the system considered the phone number as valid enough.
Having a more complex check would be possible but the issue is that it is really complex to handle all the possible checks for all the possible ways to write a phone number throughout the world.
You want to force only digits but then, what if the customer enters +33626552665 which is a valid phone number in France, and what if the customer enters (541) 754-3010 which is a valid phone number in the USA ? If we only accepted digits, these would be refused.
You can read more about this here:
stackoverflow.com/questions/4338267/vali...mber-with-javascript
The problem is that we cannot be too strict with phone numbers checks as otherwise we'll refuse valid phone numbers.

A simpler solution and which is 100% guaranteed to allow only valid phone numbers is this one:
www.acyba.com/acysms/407-how-to-improve-...ml#phoneverification
It will actually send a SMS with a code to validate the phone number.

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

  • Posts: 11
  • Thank you received: 0
9 years 6 months ago #202731

Hi,

I see from where you are comping. While it doesn't make sense to me to allow letters on telephone field (symbols Okay but letter!), I think you're right. There is no reason to make this field only digit since anyone can use invalid phone number such as (555-555-5555) which is totally incorrect phone number even if the letter is not allowed. So, in both way using letter or not people can type incorrect number. Yes, the ACYSMS valid phone numbers is the way to go with if the phone number is considered as a high priority. I just getting some people registering to the system without placing orders with incorrect information (specially the phone number). I just want to narrow this. However, I do not need to valid the phone number to see if the person is real or not for the payment cause people will pay first using PayPal and then we will process the order. Since ACYSMS is expense, I will consider it in future :)

Thanks for your help,
RAID

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

Time to create page: 0.066 seconds
Powered by Kunena Forum