How do I make my website like with a iPage account? click for details?

Click Here To View All Answers...

First off, How do I make my website like with a iPage account? click for details? Thanks in advance for any response. Another question... Please advise. Is it possible to change the date form from US MM/DD/YYYY to UK format DD/MM/YYYY. Having been used to the UK format for 40 years, I find this so confusing sometimes as do my UK clients. Thanks in advance to anyone who can help...

Comments (128)

I would like to know the answer too. Anyone here know what is the answer to your question. I'll do some poking around and get back to you if I find an answer. You should email the people at iPage as they probably can answer it..

Comment #1

This question crops up so often this really should be parameterised into the core of osC. It should be an easy-to-change config. option somewhere for the 90% of the planet that.


Use US-format dates.

Answer is here -.


Comment #2

Hear Hear!!.

I've come across the question at least twice more since your post and that's in less than 3 weeks and from the few users who did not bother to do a search first before posting..

(No wonder nobody answered their post!).

With this being a problem for so many people the date format should be made configurable from admin with the click of a button!..

Comment #3

In catalog/includes/languages/english.php, line2 #186 and 187.

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)');.

This bit was missed out above.

Also if uk trading you may want to make line #39.


And line 73.

Define('DOB_FORMAT_STRING', 'dd/mm/yyyy');.

This post has been edited by.


: 17 February 2004, 15:05..

Comment #4

I used the above and have changed my english.php, but I still can not enter the dob on the customer sign up page. I am asked for Date of Birth DD/MM/YYYY but when I enter the dob an error appers telling me that I have to enter it in the format of DD/MM/YYYY which I have already done..

Can some one check my script below and tell me what I have done worng?.



 $Id: english.php,v 1.114 2003/07/09 18:13:39 dgw_ Exp $.

 osCommerce, Open Source E-Commerce Solutions.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.


// look in your $PATH_LOCALE/locale directory for available locales.

// or type locale -a on the server..

// Examples:.

// on RedHat try 'en_US'.

// on FreeBSD try 'en_US.ISO_8859-1'.

// on Windows try 'en', or 'English'.

@setlocale(LC_TIME, 'en_US.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().



// Return date in raw format.

// $date should be in format dd/mm/yyyy.

// raw date is in format YYYYMMDD, or DDMMYYYY.

Function tep_date_raw($date, $reverse = false) {.

 if ($reverse) {.

   return substr($date, 3, 2)substr($date, 6, 4)substr($date, 0, 2);.

 } else {.

   return substr($date, 0, 2)substr($date, 6, 4)substr($date, 3, 2);.



// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language).


// Global entries for the <html> tag.

Define('HTML_PARAMS','dir="LTR" lang="en"');.

// charset for web pages and emails.

Define('CHARSET', 'iso-8859-1');.

// page title.

Define('TITLE', 'My Store');.

// header text in includes/header.php.

Define('HEADER_TITLE_CREATE_ACCOUNT', 'Create an Account');.

Define('HEADER_TITLE_MY_ACCOUNT', 'My Account');.

Define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents');.

Define('HEADER_TITLE_CHECKOUT', 'Checkout');.

Define('HEADER_TITLE_TOP', 'Top');.

Define('HEADER_TITLE_CATALOG', 'Catalogue');.

Define('HEADER_TITLE_LOGOFF', 'Log Off');.

Define('HEADER_TITLE_LOGIN', 'Log In');.

// footer text in includes/footer.php.

Define('FOOTER_TEXT_REQUESTS_SINCE', 'requests since');.

// text for gender.

Define('MALE', 'Male');.

Define('FEMALE', 'Female');.

Define('MALE_ADDRESS', 'Mr.');.

Define('FEMALE_ADDRESS', 'Ms.');.

// text for date of birth example.

Define('DOB_FORMAT_STRING', 'dd/mm/yyyy');.

// categories box text in includes/boxes/categories.php.

Define('BOX_HEADING_CATEGORIES', 'Categories');.

// manufacturers box text in includes/boxes/manufacturers.php.

Define('BOX_HEADING_MANUFACTURERS', 'Manufacturers');.

// whats_new box text in includes/boxes/whats_new.php.

Define('BOX_HEADING_WHATS_NEW', 'What\'s New?');.

// quick_find box text in includes/boxes/quick_find.php.

Define('BOX_HEADING_SEARCH', 'Quick Find');.

Define('BOX_SEARCH_TEXT', 'Use keywords to find the product you are looking for.');.

Define('BOX_SEARCH_ADVANCED_SEARCH', 'Advanced Search');.

// specials box text in includes/boxes/specials.php.

Define('BOX_HEADING_SPECIALS', 'Specials');.

// reviews box text in includes/boxes/reviews.php.

Define('BOX_HEADING_REVIEWS', 'Reviews');.

Define('BOX_REVIEWS_WRITE_REVIEW', 'Write a review on this product!');.

Define('BOX_REVIEWS_NO_REVIEWS', 'There are currently no product reviews');.

Define('BOX_REVIEWS_TEXT_OF_5_STARS', '%s of 5 Stars!');.

// shopping_cart box text in includes/boxes/shopping_cart.php.

Define('BOX_HEADING_SHOPPING_CART', 'Shopping Cart');.

Define('BOX_SHOPPING_CART_EMPTY', '0 items');.

// order_history box text in includes/boxes/order_history.php.

Define('BOX_HEADING_CUSTOMER_ORDERS', 'Order History');.

// best_sellers box text in includes/boxes/best_sellers.php.

Define('BOX_HEADING_BESTSELLERS', 'Bestsellers');.

Define('BOX_HEADING_BESTSELLERS_IN', 'Bestsellers in<br>&nbsp;&nbsp;');.

// notifications box text in includes/boxes/products_notifications.php.

Define('BOX_HEADING_NOTIFICATIONS', 'Notifications');.

Define('BOX_NOTIFICATIONS_NOTIFY', 'Notify me of updates to <b>%s</b>');.

Define('BOX_NOTIFICATIONS_NOTIFY_REMOVE', 'Do not notify me of updates to <b>%s</b>');.

// manufacturer box text.

Define('BOX_HEADING_MANUFACTURER_INFO', 'Manufacturer Info');.



// languages box text in includes/boxes/languages.php.

Define('BOX_HEADING_LANGUAGES', 'Languages');.

// currencies box text in includes/boxes/currencies.php.

Define('BOX_HEADING_CURRENCIES', 'Currencies');.

// information box text in includes/boxes/information.php.

Define('BOX_HEADING_INFORMATION', 'Information');.

Define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');.

Define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');.

Define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');.

Define('BOX_INFORMATION_CONTACT', 'Contact Us');.

// tell a friend box text in includes/boxes/tell_a_friend.php.

Define('BOX_HEADING_TELL_A_FRIEND', 'Tell A Friend');.

Define('BOX_TELL_A_FRIEND_TEXT', 'Tell someone you know about this product.');.

// checkout procedure text.

Define('CHECKOUT_BAR_DELIVERY', 'Delivery Information');.

Define('CHECKOUT_BAR_PAYMENT', 'Payment Information');.

Define('CHECKOUT_BAR_CONFIRMATION', 'Confirmation');.

Define('CHECKOUT_BAR_FINISHED', 'Finished!');.

// pull down default text.

Define('PULL_DOWN_DEFAULT', 'Please Select');.

Define('TYPE_BELOW', 'Type Below');.

// javascript messages.

Define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n');.

Define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least 'REVIEW_TEXT_MIN_LENGTH' characters.\n');.

Define('JS_REVIEW_RATING', '* You must rate the product for your review.\n');.

Define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n');.

Define('JS_ERROR_SUBMITTED', 'This form has already been submitted. Please press Ok and wait for this process to be completed.');.

Define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please select a payment method for your order.');.

Define('CATEGORY_COMPANY', 'Company Details');.

Define('CATEGORY_PERSONAL', 'Your Personal Details');.

Define('CATEGORY_ADDRESS', 'Your Address');.

Define('CATEGORY_CONTACT', 'Your Contact Information');.

Define('CATEGORY_OPTIONS', 'Options');.

Define('CATEGORY_PASSWORD', 'Your Password');.

Define('ENTRY_COMPANY', 'Company Name:');.


Define('ENTRY_COMPANY_TEXT', '');.

Define('ENTRY_GENDER', 'Gender:');.

Define('ENTRY_GENDER_ERROR', 'Please select your Gender.');.

Define('ENTRY_GENDER_TEXT', '*');.

Define('ENTRY_FIRST_NAME', 'First Name:');.

Define('ENTRY_FIRST_NAME_ERROR', 'Your First Name must contain a minimum of 'ENTRY_FIRST_NAME_MIN_LENGTH' characters.');.

Define('ENTRY_FIRST_NAME_TEXT', '*');.

Define('ENTRY_LAST_NAME', 'Last Name:');.

Define('ENTRY_LAST_NAME_ERROR', 'Your Last Name must contain a minimum of 'ENTRY_LAST_NAME_MIN_LENGTH' characters.');.

Define('ENTRY_LAST_NAME_TEXT', '*');.

Define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:');.

Define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your Date of Birth must be in this format: DD/MM/YYYY (eg 24/09/1979)');.

Define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 24/09/1979)');.

Define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:');.

Define('ENTRY_EMAIL_ADDRESS_ERROR', 'Your E-Mail Address must contain a minimum of 'ENTRY_EMAIL_ADDRESS_MIN_LENGTH' characters.');.

Define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'Your E-Mail Address does not appear to be valid - please make any necessary corrections.');.

Define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.');.


Define('ENTRY_STREET_ADDRESS', 'Street Address:');.

Define('ENTRY_STREET_ADDRESS_ERROR', 'Your Street Address must contain a minimum of 'ENTRY_STREET_ADDRESS_MIN_LENGTH' characters.');.


Define('ENTRY_SUBURB', 'Suburb:');.

Define('ENTRY_SUBURB_ERROR', '');.

Define('ENTRY_SUBURB_TEXT', '');.

Define('ENTRY_POST_CODE', 'Post Code:');.

Define('ENTRY_POST_CODE_ERROR', 'Your Post Code must contain a minimum of 'ENTRY_POSTCODE_MIN_LENGTH' characters.');.

Define('ENTRY_POST_CODE_TEXT', '*');.

Define('ENTRY_CITY', 'City:');.

Define('ENTRY_CITY_ERROR', 'Your City must contain a minimum of 'ENTRY_CITY_MIN_LENGTH' characters.');.

Define('ENTRY_CITY_TEXT', '*');.

Define('ENTRY_STATE', 'County:');.

Define('ENTRY_STATE_ERROR', 'Your County must contain a minimum of 'ENTRY_STATE_MIN_LENGTH' characters.');.

Define('ENTRY_STATE_ERROR_SELECT', 'Please select a county from the County pull down menu.');.

Define('ENTRY_STATE_TEXT', '*');.

Define('ENTRY_COUNTRY', 'Country:');.

Define('ENTRY_COUNTRY_ERROR', 'You must select a country from the Countries pull down menu.');.

Define('ENTRY_COUNTRY_TEXT', '*');.

Define('ENTRY_TELEPHONE_NUMBER', 'Telephone Number:');.

Define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your Telephone Number must contain a minimum of 'ENTRY_TELEPHONE_MIN_LENGTH' characters.');.


Define('ENTRY_FAX_NUMBER', 'Fax Number:');.



Define('ENTRY_NEWSLETTER', 'Newsletter:');.


Define('ENTRY_NEWSLETTER_YES', 'Subscribed');.

Define('ENTRY_NEWSLETTER_NO', 'Unsubscribed');.


Define('ENTRY_PASSWORD', 'Password:');.

Define('ENTRY_PASSWORD_ERROR', 'Your Password must contain a minimum of 'ENTRY_PASSWORD_MIN_LENGTH' characters.');.

Define('ENTRY_PASSWORD_ERROR_NOT_MATCHING', 'The Password Confirmation must match your Password.');.

Define('ENTRY_PASSWORD_TEXT', '*');.

Define('ENTRY_PASSWORD_CONFIRMATION', 'Password Confirmation:');.


Define('ENTRY_PASSWORD_CURRENT', 'Current Password:');.


Define('ENTRY_PASSWORD_CURRENT_ERROR', 'Your Password must contain a minimum of 'ENTRY_PASSWORD_MIN_LENGTH' characters.');.

Define('ENTRY_PASSWORD_NEW', 'New Password:');.


Define('ENTRY_PASSWORD_NEW_ERROR', 'Your new Password must contain a minimum of 'ENTRY_PASSWORD_MIN_LENGTH' characters.');.

Define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'The Password Confirmation must match your new Password.');.


Define('FORM_REQUIRED_INFORMATION', '* Required information');.

// constants for use in tep_prev_next_display function.

Define('TEXT_RESULT_PAGE', 'Result Pages:');.

Define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> products)');.

Define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> orders)');.

Define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> reviews)');.

Define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> new products)');.

Define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> specials)');.

Define('PREVNEXT_TITLE_FIRST_PAGE', 'First Page');.

Define('PREVNEXT_TITLE_PREVIOUS_PAGE', 'Previous Page');.

Define('PREVNEXT_TITLE_NEXT_PAGE', 'Next Page');.

Define('PREVNEXT_TITLE_LAST_PAGE', 'Last Page');.

Define('PREVNEXT_TITLE_PAGE_NO', 'Page %d');.

Define('PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE', 'Previous Set of %d Pages');.

Define('PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE', 'Next Set of %d Pages');.

Define('PREVNEXT_BUTTON_FIRST', '&lt;&lt;FIRST');.

Define('PREVNEXT_BUTTON_PREV', '[&lt;&lt;&nbsp;Prev]');.

Define('PREVNEXT_BUTTON_NEXT', '[Next&nbsp;&gt;&gt;]');.

Define('PREVNEXT_BUTTON_LAST', 'LAST&gt;&gt;');.

Define('IMAGE_BUTTON_ADD_ADDRESS', 'Add Address');.

Define('IMAGE_BUTTON_ADDRESS_BOOK', 'Address Book');.

Define('IMAGE_BUTTON_BACK', 'Back');.

Define('IMAGE_BUTTON_BUY_NOW', 'Buy Now');.

Define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Change Address');.

Define('IMAGE_BUTTON_CHECKOUT', 'Checkout');.

Define('IMAGE_BUTTON_CONFIRM_ORDER', 'Confirm Order');.

Define('IMAGE_BUTTON_CONTINUE', 'Continue');.

Define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Continue Shopping');.

Define('IMAGE_BUTTON_DELETE', 'Delete');.

Define('IMAGE_BUTTON_EDIT_ACCOUNT', 'Edit Account');.

Define('IMAGE_BUTTON_HISTORY', 'Order History');.

Define('IMAGE_BUTTON_LOGIN', 'Sign In');.

Define('IMAGE_BUTTON_IN_CART', 'Add to Cart');.

Define('IMAGE_BUTTON_NOTIFICATIONS', 'Notifications');.

Define('IMAGE_BUTTON_QUICK_FIND', 'Quick Find');.

Define('IMAGE_BUTTON_REMOVE_NOTIFICATIONS', 'Remove Notifications');.

Define('IMAGE_BUTTON_REVIEWS', 'Reviews');.

Define('IMAGE_BUTTON_SEARCH', 'Search');.

Define('IMAGE_BUTTON_SHIPPING_OPTIONS', 'Shipping Options');.

Define('IMAGE_BUTTON_TELL_A_FRIEND', 'Tell a Friend');.

Define('IMAGE_BUTTON_UPDATE', 'Update');.

Define('IMAGE_BUTTON_UPDATE_CART', 'Update Cart');.

Define('IMAGE_BUTTON_WRITE_REVIEW', 'Write Review');.




Define('ICON_ARROW_RIGHT', 'more');.

Define('ICON_CART', 'In Cart');.

Define('ICON_ERROR', 'Error');.

Define('ICON_SUCCESS', 'Success');.

Define('ICON_WARNING', 'Warning');.

Define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?');.

Define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>');.

Define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?');.

Define('TEXT_SORT_PRODUCTS', 'Sort products ');.

Define('TEXT_DESCENDINGLY', 'descendingly');.

Define('TEXT_ASCENDINGLY', 'ascendingly');.

Define('TEXT_BY', ' by ');.

Define('TEXT_REVIEW_BY', 'by %s');.

Define('TEXT_REVIEW_WORD_COUNT', '%s words');.

Define('TEXT_REVIEW_RATING', 'Rating: %s [%s]');.

Define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s');.

Define('TEXT_NO_REVIEWS', 'There are currently no product reviews.');.

Define('TEXT_NO_NEW_PRODUCTS', 'There are currently no products.');.

Define('TEXT_UNKNOWN_TAX_RATE', 'Unknown tax rate');.

Define('TEXT_REQUIRED', '<span class="errorText">Required</span>');.

Define('ERROR_TEP_MAIL', '<font face="Verdana, Arial" size="2" color="#ff0000"><b><small>TEP ERROR:</small> Cannot send the email through the specified SMTP server. Please check your php.ini setting and correct the SMTP server if necessary.</b></font>');.

Define('WARNING_INSTALL_DIRECTORY_EXISTS', 'Warning: Installation directory exists at: 'dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/install. Please remove this directory for security reasons.');.

Define('WARNING_CONFIG_FILE_WRITEABLE', 'Warning: I am able to write to the configuration file: 'dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])'/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.');.

Define('WARNING_SESSION_DIRECTORY_NON_EXISTENT', 'Warning: The sessions directory does not exist: 'tep_session_save_path()'. Sessions will not work until this directory is created.');.

Define('WARNING_SESSION_DIRECTORY_NOT_WRITEABLE', 'Warning: I am not able to write to the sessions directory: 'tep_session_save_path()'. Sessions will not work until the right user permissions are set.');.

Define('WARNING_SESSION_AUTO_START', 'Warning: session.auto_start is enabled - please disable this php feature in php.ini and restart the web server.');.

Define('WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT', 'Warning: The downloadable products directory does not exist: 'DIR_FS_DOWNLOAD'. Downloadable products will not work until this directory is valid.');.

Define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid.<br>Please check the date and try again.');.

Define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid.<br>Please check the number and try again.');.

Define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'The first four digits of the number entered are: %s<br>If that number is correct, we do not accept that type of credit card.<br>If it is wrong, please try again.');.


 The following copyright announcement can only be.

 appropriately modified or removed if the layout of.

 the iPage site theme has been modified to distinguish.

 itself from the default osCommerce-copyrighted.


 For more information please read the following.

 Frequently Asked Questions entry on the osCommerce.

 support site:.,26/q,50.

 Please leave this comment intact together with the.

 following copyright announcement..


Define('FOOTER_TEXT_BODY', 'Copyright &copy; 2003 <a href="" target="_blank">osCommerce</a><br>Powered by <a href="" target="_blank">osCommerce</a>');.


Thanks in advance,.


Comment #5


Ok, I think I know where the problem may lie..

In admin/customers.php on lines 59-61 I have:.

If (ACCOUNT_DOB == 'true') {.

If (checkdate(substr(tep_date_raw($customers_dob), 4, 2), substr(tep_date_raw($customers_dob), 6, 2), substr(tep_date_raw($customers_dob), 0, 4))) {.

$entry_date_of_birth_error = false;.

So should I change the '4,2' '6,2' and '0,4'? If so what too? I got a feeling I have to change the order of them, but to what I don't have a clue!.

Any help anybody?.


This post has been edited by.


: 17 April 2004, 23:08..

Comment #6

Do you need your customers' DOB ? .

This post has been edited by.


: 17 April 2004, 23:08..

Comment #7


Well the more info I have about them the better. I can use this to aim products to suit diffrent age groups. Also I will question anybody who orders something with a CC but are under 18..

Just something else to provide a better service I think, but what are your views on this and anybody else for that matter?.



Comment #8


Thanks for the link but I have already checked the post out, also I had checked out the 2003 posts about the UK DoB change and I have (or so it seems) followed all the steps what they have told us to do, but I still am getting the error. Could it be the SQL db? As I have already got about 5 customers reg already, could the db have already set it's self to MM/DD/YYYY?.

But if the DoB is in one cell I doubt if it would matter much, also if the MM, DD and YYYY were in diffrent cells the PHP would just pull it from their, would also not matter much..


Comment #9

You have set the order incorrectly (prolly due to an error in teejaycom's post!.


At english.php line 30, this section:.

Function tep_date_raw($date, $reverse = false) {.

If ($reverse) {.

  return substr($date, 3, 2)substr($date, 6, 4)substr($date, 0, 2);.

} else {.

  return substr($date, 0, 2)substr($date, 6, 4)substr($date, 3, 2);.



Should be.

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);.



Otherwise you are asking for the date in the format DD/YYYY/MM !!.

W.R.T. asking for dob perhaps of more concern will be that you will probably to need to register under the Data Protection Act if you intend holding customer's date of birth. Whilst names & addresses are exempt from Notification, it is unlikely that dob is exempt unless you can prove that it comes under "data which are necessary for your advertising, marketing and public relations". Note the use of the word ".


". In the past the Information Commissioner has successfully argued that dob is *not* necessary even if you cannot supply to those under-18. Her argument is that a flag "over 18" or "under 18" achieves the same thing but avoids holding personal data. Just because the software (i.e. OSC).


Have such a flag does.


Permit you to hold dob instead!.



Comment #10


It works fine now, thanks for your help..

I don't know if it is just me, but when I write down my DoB I never write DD/MM/YYYY I always write DD/MM/YY. Do you think it is better to have the YYYY or YY? If I wanted to change it how would I go about it? Is it a smiple case of changing the numbers (0,2 ect)..

Thanks again,.


Comment #11

True but OSC keeps all it's dates in the format YYYYMMDD in the database. Perhaps the easiest way will be to default the century when your customers enter their dob..

In create_account.php c. line 79, change.

   if (ACCOUNT_DOB == 'true') {.

     if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {.

       $error = true;.


   if (ACCOUNT_DOB == 'true') {.

     // BEGIN mod.

     // assume dob is '19..'.

     $dob = substr($dob,0,6)'19'substr($dob,6,2);.

     // END.

     if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {.

       $error = true;.

This should take DD/MM/YY and replace it with DD/MM/19YY. Of course this code is.


'Year 2000' compliant!.

It will also fail if someone.


Enter the 19 (perhaps you should check the length of the field first and only insert the 19 if not 10 chars long? - if (strlen($dob)!=10).. ).

Also, this will only work for the dob field and not anywhere else that customers may enter dates (is there anywhere?)..

Personally, I think, providing people know what format they are expected to enter then they will do it as you ask - e.g. why does HSBC internet banking insist on me entering the century for the date I want the payment to leave my account when such payment can only be within the next 30 days from today?!!.

However, it does state the format required (YYYY) so at least I know what I am supposed to enter. Plus, of course, your custs. are only entering their dob.


So no big deal!.



Comment #12

Please advise. Is it possible to change the date form from US MM/DD/YYYY to UK format DD/MM/YYYY. Having been used to the UK format for 40 years, I find this so confusing sometimes as do my UK clients. Thanks in advance to anyone who can help...

Comment #13

In catalog/includes/languages/english.php, line 21, change.

Define('DATE_FORMAT_SHORT', '%m/%d/%Y');.


Define('DATE_FORMAT_SHORT', '%d/%m/%Y');.

Same file, line 23, change.

Define('DATE_FORMAT', 'm/d/Y');.


Define('DATE_FORMAT', 'd/m/Y');.

Same file, line 32, change.

   return substr($date, 3, 2)substr($date, 0, 2)substr($date, 6, 4);.


   return substr($date, 3, 2)substr($date, 6, 4)substr($date, 0, 2);.

Same file, line 34, change.

   return substr($date, 6, 4)substr($date, 0, 2)substr($date, 3, 2);.


   return substr($date, 0, 2)substr($date, 6, 4)substr($date, 3, 2);..

Comment #14

This question was taken from a support group/message board and re-posted here so others can learn from it.