New Zenner
- Join Date:
- Mar 2012
- Posts:
- 11
- Plugin Contributions:
- 0
Making Telephone number a compulsory field
Our Couriers require a telephone number for each order.
How can we make the telephone number a required field for customers ?
Views: 4,535
New Zenner
Our Couriers require a telephone number for each order.
How can we make the telephone number a required field for customers ?
Totally Zenned
admin->configuration->minimum values->telephone number
Set it to at least 5 or 6. Keep in mind this will NOT affect returning customers who already created an account earlier - you'd need to add some custom code to require a phone number from existing customers when they log in or start checkout.
New Zenner
Thank you for your reply.
I went it and changed it to 6 but the value there was 3 so not sure why this did not prevent the customer from being able to place an order without a telephone number.
balihr:
admin->configuration->minimum values->telephone number
Set it to at least 5 or 6. Keep in mind this will NOT affect returning customers who already created an account earlier - you'd need to add some custom code to require a phone number from existing customers when they log in or start checkout.
Totally Zenned
aovc:
Thank you for your reply.
I went it and changed it to 6 but the value there was 3 so not sure why this did not prevent the customer from being able to place an order without a telephone number.
As stated by balihr, the setting (whatever it may be or have been) will have no effect on existing customers. Based on the conversation one might assume that you are referring to orders placed by customers that have established an account after the time that a minimum value of 3 was established; however, the fact is not directly discussed yet.
The suggestion would be to review the affected order history against the customers. Identify when the customers established their account, then if the customers provided a phone number. Also to identify when the setting of 3 was established. From there can diagnose what the issue is and how to accomplish the desired modifications/actions.
Zen Follower
I have the same issue. The minimum number has always been set to 3, yet new customers register without a phone number. I'm using v1.5.5d.
Strangely in Configuration>Customer details there is no option to make phone numbers a requirement, while there is an option for almost every other field.
Did anyone resolve this issue?
Administrator
In what way is your store's /includes/modules/create_account.php (or the copy in /includes/modules/YOUR_TEMPLATE/create_account.php) different from the as-shipped version?
For that processing, if a customer enters a telephone-number of length less than the minimum-configured ... the account will not be created.
Zen Follower
lat9:
In what way is your store's /includes/modules/create_account.php (or the copy in /includes/modules/YOUR_TEMPLATE/create_account.php) different from the as-shipped version?
For that processing, if a customer enters a telephone-number of length less than the minimum-configured ... the account will not be created.
As far as I know, that file has no differences, yet we have a few new customers with no phone number in the field.
Administrator
Does your store accept payment via PayPal Express Checkout? If so, have the accounts that were created without phone numbers resulting from an express-checkout customer?
Totally Zenned
ttfan:
As far as I know, that file has no differences, yet we have a few new customers with no phone number in the field.
did you check the user account phone number for blink spaces? 3 spaces equals 3 characters which creates the field as true when that is not a true phone number! The number is a string field and it's compared to a number by counting the characters like this (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) A set of 3 characters using (strlen) would = 3.
The fix is to use some script to mask the input, basically forcing the user to enter the correct information. The mask I use only allows numbers in the right order for the USA. But we still can't force them to truly enter there phone unless we use SMS and require a key entered to finish the account creation. a phone opt-in-opt-out set of code.
Google maskedinput
which is a jquery set of code.
I placed the code in the template tpl_create_account_default.php file at the bottom and used the class in the tpl_modules_create_account.php You code just use the ID tag if you like.
<script src="<?php echo $template->get_template_dir('jqueryui.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/jqueryui.js' ?>" type="text/javascript"></script>
<script src="<?php echo $template->get_template_dir('jquery.maskedinput.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/jquery.maskedinput.js' ?>" type="text/javascript"></script>
<script>
$(function() {
$("#date")
.datepicker({ nextText: "", prevText: "", changeMonth: true, changeYear: true })
.mask("99/99/9999");
$(".phone") .mask("999-999-9999");
});
</script>
I also use it in the DOB field
Zen Follower
I've tested it myself, and it does not let you submit the page without entering characters in the phone field. Davewest must be right, they must be entering spaces, because the field is blank for some customers...the file must be removing these spaces before saving to the database because there are no spaces in the customer field when I check it.
Totally Zenned
ttfan:
I've tested it myself, and it does not let you submit the page without entering characters in the phone field. Davewest must be right, they must be entering spaces, because the field is blank for some customers...the file must be removing these spaces before saving to the database because there are no spaces in the customer field when I check it.
Didn't answer the question previously asked regarding PayPal.
Also, while jquery, javascript, etc. Are good tools to give a good user experience, they can effectively be disabled. A check of the content of the submitted data would be necessary to further ensure at least some value was entered.
Zen Follower
lat9:
Does your store accept payment via PayPal Express Checkout? If so, have the accounts that were created without phone numbers resulting from an express-checkout customer?
I conpletely missed your comment.... yes you are absolutely right. I know now PayPal Express Checkout is what's causing the accounts without a phone numbers... not sure how to fix it though. Has anyone found a fix for this?
Zen Follower
I guess not?
Totally Zenned
ttfan:
I guess not?
Because of a similar issue I deleted the 'checkout with PayPal' buttons on both the shopping cart page and checkout page which forces the customer use just the checkout button and then to either register an account or use guest checkout (with OPC - One Page Checkout - plugin installed) - guest checkout requires phone number as 'required' before guest is able to proceed - then they can elect to use PayPal as a payment method on the next page of the process. OPC does NOT register the customer as a 'customer' which may be a drawback for some for future marketing however this 'solution' would give the couriers the phone number they need.
Now thinking about it, it may be possible to link the checkout with PayPal button(s) to the Guest Checkout page (with OPC installed) - the customer then knows they are on track to use PayPal ??
Thoughts??
cheers,
Mike
New Zenner
I'm still having the same issue where changing the minimum value doesn't actually affect the form. I keep getting orders submitted without phone numbers but DHL requires a phone number. Is there not a simple solution for this?
Administrator
clam_man:
I'm still having the same issue where changing the minimum value doesn't actually affect the form. I keep getting orders submitted without phone numbers but DHL requires a phone number. Is there not a simple solution for this?
What payment method(s) are in use?
Totally Zenned
clam_man:
I'm still having the same issue where changing the minimum value doesn't actually affect the form. I keep getting orders submitted without phone numbers but DHL requires a phone number. Is there not a simple solution for this?
I have seen other online store operators ask similar questions. The problem is, DHL my require a phone number but that does not stop your customer from entering gibberish or just a fake number. To me, that result is worse that no phone number at all. Suggestions on some other shipping sites are if a customer does not list a phone number for a shipment, you enter your number instead. At least if something goes wrong, you can rest assured that DHL has someone that they can contact.
New Zenner
We use authorize.net for credit cards and PayPal. The use of our number instead might work but I need to look into what negative effects that might cause with DHL.
Administrator
clam_man:
We use authorize.net for credit cards and PayPal. The use of our number instead might work but I need to look into what negative effects that might cause with DHL.
Are the missing telephone numbers associated with one, the other or both payment methods?
Totally Zenned
Not sure if the OP resolved this, but we have similar issues, and ultimately, if a customer will not / cannot provide a valid phone number, there's nothing one can do about it. SO... in cases where DHL is the shipping, and we need a tel number, we put in OUR OWN telephone number... At least in that way, WE are advised by DHL of tracking and delivery, and (if necessary) can email the customer with details.
In many cases, people hate being spammed with text messages - and that's why they don't provide a number.
So what if DHL sends a text saying "your delivery is on it's way!"... I mean... that's what they DO isn't it? - deliver stuff...
If a customer DOES NOT get his stuff, you'll know (as DHL is communicating with YOU) and you can be sure the customer will call if they don't get the goods.
It's a non-issue in the real world...
Tell staff why this post should be reviewed.