OMalleys Posted December 27, 2003 Share Posted December 27, 2003 I need to change the date of birth format to UK style dd/mm/yyyy I have changed the format in includes/laguages/english.php When I view customer details it now displays the dob in the UK format BUT when I try to set up a new customer account it still asks for the US format mm/dd/yyyy Can anyone help - I have searched dozend of old threads but none seem to have the answer. Thanks David Link to comment Share on other sites More sharing options...
241 Posted December 27, 2003 Share Posted December 27, 2003 catalog/includes/languages/english.php around line 186 define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your Date of Birth must be in this format: DD/MM/YYYY (eg 21/05/1970)'); define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 21/05/1970)'); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
OMalleys Posted December 27, 2003 Author Share Posted December 27, 2003 Thanks Steve you are a life saver - that has now fixed half of the problem: I have looked for that code but can only find this: define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:'); define('ENTRY_DATE_OF_BIRTH_ERROR', ' <small><font color="#FF0000">(eg. 21/05/1970)</font></small>'); define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 21/05/1970) <font color="#AABBDD">required</font></small>'); As you can see I have changed it - now the new account screen asks for the dob in the UK format (before the prompt showed US format ie. 05/21/1970) but it still throws an error unless it is input in US format?? Anyone any more ideas? David Link to comment Share on other sites More sharing options...
241 Posted December 27, 2003 Share Posted December 27, 2003 have you also done the admin for dob ? do you have this for catalog/includes/languages/english.php @setlocale(LC_TIME, 'en_UK.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); ?// this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); and this // text for date of birth example define('DOB_FORMAT_STRING', 'dd/mm/yyyy'); and this for admin/includes/languages/english.php @setlocale(LC_TIME, 'en_UK.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('PHP_DATE_TIME_FORMAT', 'd/m/Y H:i:s'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S') // text for date of birth example define('DOB_FORMAT_STRING', 'dd/mm/yyyy'); define('JS_DOB', '* The \'Date of Birth\' entry must be in the format: xx/xx/xxxx (date/month/year).\n'); define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(eg. 05/21/1970)</span>'); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
OMalleys Posted December 27, 2003 Author Share Posted December 27, 2003 Thanks again Steve - I certainly appreciate your help. I have checked all of the code you mentioned and it is all correct (the LC_TIME was set to US but I have now changed that) However I cannot find one piece of code in admin/includes/languages/english.php define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(eg. 05/21/1970)</span>'); I have searched the entire file and it doesn't seem to be there, this is all I could find in the area where I think it should be: define('ENTRY_GENDER', 'Gender:'); define('ENTRY_GENDER_ERROR', ' <small><font color="#AABBDD">required</font></small>'); define('ENTRY_FIRST_NAME', 'First Name:'); define('ENTRY_LAST_NAME', 'Last Name:'); define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:'); define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:'); define('ENTRY_COMPANY', 'Company name:'); define('ENTRY_STREET_ADDRESS', 'Street Address:'); define('ENTRY_SUBURB', 'Suburb:'); Sorry to be a pain but this is very frustrating, although I am very new to all of this and I must admit that frustrations excepted .... I am enjoying it :) David Link to comment Share on other sites More sharing options...
241 Posted December 28, 2003 Share Posted December 28, 2003 Have you emptied your cache so as to make sure that you are not caching local files? No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
OMalleys Posted December 28, 2003 Author Share Posted December 28, 2003 I hadn't --- doooh! ..... but I have just tried that and still no luck ....... maybe a nights sleep will make things look clearer! David Link to comment Share on other sites More sharing options...
UKUSER Posted December 28, 2003 Share Posted December 28, 2003 Hi I am having the same issue, I have done all the changes. Please keep the string going..as it would be nice to fix it! Martyn Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2003 Share Posted December 28, 2003 I cannot find one piece of code in admin/includes/languages/english.php define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(eg. 05/21/1970)</span>'); I don't have this line either...are you actually experiencing a problem still? The admin language files only affect what you see (with the exception of a couple emails that you can send from admin to customers). They wouldn't affect your customers. I'm confused as to what problem you are seeing now. Hth, Matt Link to comment Share on other sites More sharing options...
OMalleys Posted December 28, 2003 Author Share Posted December 28, 2003 Thanks for posting Matt At this stage I am probably far more confused than you about what I am seeing - but here goes! When a customer sets up a new account - the prompt show the date in the format dd/mm/yyyy which is what I want, however he must actually input it as mm/dd/yyyy otherwise it initiates an error and returns him to the dob field to correct it. HOWEVER - when the customer successfully sets up an account and then views account details his dob is shown in the desired dd/mm/yyyy similaraly I see it in this format when viewing through admin?? All I need to fix is the actual entry of the DOB by the customer (I think!!) I'm quite sure it's very easy (when you know how) Thanks again David David Link to comment Share on other sites More sharing options...
UKUSER Posted December 28, 2003 Share Posted December 28, 2003 Yes its just the same for me... when a customer enters his DOB it must be in US format otherwise it gets rejected. All other places the date is ok Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2003 Share Posted December 28, 2003 Around lines 30-6 of includes/languages/english.php, try changing function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } to function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } Hth, Matt Link to comment Share on other sites More sharing options...
OMalleys Posted December 28, 2003 Author Share Posted December 28, 2003 SORTED! Thanks a million Matt - that worked a treat. Cheers .... David David Link to comment Share on other sites More sharing options...
sputnikinternet Posted December 29, 2003 Share Posted December 29, 2003 I've just got mine working after having the same problem. The solution was.... Remember there are 2 english.php files. They are in /languages/includes/english.php /admin/languages/includes/english.php and both need changing. Hope this helps Andy Link to comment Share on other sites More sharing options...
UKUSER Posted December 31, 2003 Share Posted December 31, 2003 Hey This also works for me... THANKS Matt :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.