Floob Posted June 9, 2015 Share Posted June 9, 2015 Hi, Is there a recommended approach to stop the telephone number being required (on the account sign up page)? Is it still to edit the code in the file (create_account.php) directly? Thanks Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 9, 2015 Share Posted June 9, 2015 @@Floob Which version of osCommerce are you using? Malcolm Link to comment Share on other sites More sharing options...
Floob Posted June 9, 2015 Author Share Posted June 9, 2015 Its 2.3.4 Link to comment Share on other sites More sharing options...
Havock Posted June 10, 2015 Share Posted June 10, 2015 In create_account.php just comment the lines : if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR); } Link to comment Share on other sites More sharing options...
Dan Cole Posted June 10, 2015 Share Posted June 10, 2015 @@Floob Not sure if this will work or not (there are posts that suggest that it will) but try setting the minimum required field size in admin to "0" and let us know what happens. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Floob Posted June 10, 2015 Author Share Posted June 10, 2015 Thanks for both of your suggestions, but neither seems to prevent the validation. See this image: http://s30.postimg.org/gzkvr9n3l/telno.png I commented the lines like this: /* if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR); } */ Link to comment Share on other sites More sharing options...
Dan Cole Posted June 10, 2015 Share Posted June 10, 2015 @@Floob Allen...I messed with it a bit and this seems to work... replace your existing echo tep_draw_input_field to this... echo tep_draw_input_field('telephone', '', 'id="inputTelephone" placeholder="' . ENTRY_OPTIONAL . '"'); Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 10, 2015 Share Posted June 10, 2015 @@Floob If you make it so that the telephone number is optional in the public side of the store, don't forget to also make it optional in the admin side. Malcolm Link to comment Share on other sites More sharing options...
Floob Posted June 10, 2015 Author Share Posted June 10, 2015 @@Dan Cole Thanks - that works (although I changed ENTRY_OPTIONAL to ENTRY_TELEPHONE_NUMBER) Still has the red required marker there though - not sure how to remove that. @Artcolnc What would happen if I dont do that? Would I not be able to update customer info? Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 10, 2015 Share Posted June 10, 2015 @Artcolnc What would happen if I dont do that? Would I not be able to update customer info? When/if you ever update a customer's info through the admin side, if the telephone number is still required in the admin side, you will have to enter a phone number. Make sense? Malcolm Link to comment Share on other sites More sharing options...
Dan Cole Posted June 10, 2015 Share Posted June 10, 2015 @@Floob Allen you'll find this line just below the line you just changed... echo FORM_REQUIRED_INPUT; Comment it out... // echo FORM_REQUIRED_INPUT; Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Floob Posted June 10, 2015 Author Share Posted June 10, 2015 @@Dan Cole Thats great - works well! Thanks. Just got to sort the admin side out now. I'll see if its obvious. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.