How can I add a phone number as a required field for anonymous purchasers?
JustJamesAus - February 25, 2008 - 04:20
| Project: | e-Commerce |
| Version: | 5.x-3.4 |
| Component: | ec_location |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I managed to add phone number as a required field when someone creates a login, by changing address.module
1. HOWEVER when someone is using an anonymous login it doesn't use the same form. Where can I find the file that creates the form used for anonymous purchases?
2. Also, how can I get the phone number to appear in the transaction list? Currently it only shows the address when the address link is clicked, I can't see any way of seeing a phone number other than going to a user's profile page - and that still only shows the phone number if they are users and have a profile.

#1
need this too!
#2
PS- telling us that a non recommended release is the only fix is not acceptable!! maintainers??? this is a basic need!
#3
+1 on the "fixed in ec4" comments as not acceptable. If the supported fix for these types of issues is use the new version, then the new version should be stable and production-ready. Otherwise, this functionality should be implemented in the recommended release.
Please don't take this comment as a knock on the developers. I know you guys/ladies work very hard to deliver a very useful and no-cost eCommerce solution to the public. We all appreciate your hard work. You (the developers) have to pick your battles and it seems that they are not enough EC developers to work on fixing the stable version and code the new version. Definitely not a fault of the current developers.
If I find some time in the next couple of days, I'll take a look at fixing up a patch to provide the anonymous phone number functionality. It will require a database schema update to the ec_transaction_address table, so my patch will make your installation deviate from the standard 3.x code base and DB schema. What that means is you'll have to apply my patch and update your EC from your Drupal update.php if you ever want to update to a new EC 3.x release.
#4
Djflux- totally with you!
if create this..Please post it here!! My client REALLY wants their buyers phone #s!!!
thanks all!!
r
#5
Same here on this being needed for ECv3.x, since there is every indication that it is still the supported & current release.
It's my understanding that UPS doesn't even ship without a valid phone number, so I don't even get why this hasn't been in EC since the ShipCalc was first introduced.
All that said, props to the talented developers of the EC project. I CAN'T WAIT for ECv4!
#6
Any movement on this?
I'm hooking into checkout_form with hook_form_alter() to handle this during ec_anon purchases, storing billilng and shipping phone in my own table tied to txnid.
It works, but it's not pretty.
#7
I could really use the option to make the phone field required. Sometimes the store owner just needs to contact the client.
#8
1. the anon address form is found in ec_store.inc.
2. you could try using the extra street address field (which is never used) and change the label using string overrides.module and call it "phone number".
#9
yea..thats what i wound up doing
#10
Modules > ecommerce > address > address.module
Line: 433 (Change: '#required' => false, to '#required' => true, )
Change:
$form['phone'] = array(
'#type' => 'textfield',
'#title' => t('Phone Number'),
'#default_value' => $edit['phone'],
'#size' => 50,
'#maxlength' => 100,
'#description' => null,
'#attributes' => null,
'#required' => false,
);
To:
$form['phone'] = array(
'#type' => 'textfield',
'#title' => t('Phone Number'),
'#default_value' => $edit['phone'],
'#size' => 50,
'#maxlength' => 100,
'#description' => null,
'#attributes' => null,
'#required' => true,
);
#11
This looks like it should "require" the phone number but, it does not.... Any ideas out there?
#12
Will this work and could you be more specific as to how to do this?
Please?
#13
I cant figure out how a sys is written to be flexible and cant achive?
I see 1 line files (that means there is a file, the code inside is only one line!), there are one function files, code is beyond spaghetti, is Ravioli code! (problem is I love ravioli, cause it tastes good )
I'll write my own with a slogan "Commerce - there is a phone area for costumers!"