mattyb Posted January 5, 2005 Posted January 5, 2005 When a customer places an order it's required that he/she has an e-mail address. Is there any way to change this so that an e-mail addy is not required? We have a number of customers that don't have e-mail. Thanx.
Jack_mcs Posted January 5, 2005 Posted January 5, 2005 You could remove this code in create_account.php. if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR); } elseif (tep_validate_email($email_address) == false) { $error = true; Although I am not sure what that will do to other parts of the shop since it probably assumes an email address is present. You would probably be better off inserting your own email address into the field. Find this line in the same file $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); and change it to $email_address = tep_db_prepare_input($HTTP_POST_VARS['sales@your_email.com']); substituting in your address of course. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
mattyb Posted January 5, 2005 Author Posted January 5, 2005 But if people have an e-mail address they would not get the confirmation e-mail when the order is placed correct?
Jack_mcs Posted January 5, 2005 Posted January 5, 2005 Oh, I thought you wanted to get rid of it completely. Try this. Find this line: $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); and add this below it if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) $email_address = tep_db_prepare_input($HTTP_POST_VARS['sales@your_email.com']); Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted January 5, 2005 Posted January 5, 2005 It would be better to use tep_is_null() to check whether the email address was sent. Then if it is null have something like $email_address = noemailgiven; Bobby
bobg7 Posted January 5, 2005 Posted January 5, 2005 Just a thought from the peanut gallery, In the SQL DB in the customers table, just make customers_email_address Null = Yes and Default = Null would that not make the email address optional? I'm not an SQL person so I hope someone can answer this before anyone makes any changes. Bob G. Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.
mattyb Posted January 5, 2005 Author Posted January 5, 2005 Bob G. That makes sense to me but if someone can confirm this before I do it that would be great b/c I too am not a SQL person. Matt
Guest Posted January 5, 2005 Posted January 5, 2005 Some (most) gateway payement modules send the customers email as part of the request. If you just make it NULL it may present problems elsewhere in the cart. Bobby
mattyb Posted January 10, 2005 Author Posted January 10, 2005 If we're not using a payment gateway then this shouldn't be an issue. At least in my head it seems right but correct me if I'm wrong.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.