Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Date of Birth format to English (GB) as opposed to English (US)


jeep11

Recommended Posts

I want my customers to be able to enter information on the create account page in the UK familar format ie when asked to enter date of birth I want them to be able to put in 16/09/64 as opposed to 09/16/64 any ideas on how to do this? :D

Link to comment
Share on other sites

Not sure if it would have to be changed anywhere else but I know you can change it on the create_account page by changing this line

 

if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS[dob_month] . '/' . $HTTP_POST_VARS[dob_day] . '/' . $HTTP_POST_VARS[dob_year]);

 

 

It is also in the main language file.. for me it is includes/languages/english.php

 

define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'm/d/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

May have to change it there as well but I am not sure. If you try any of this be sure you make backups since I am just guessing :)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Not sure if it would have to be changed anywhere else but I know you can change it on the create_account page by changing this line

 

if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS[dob_month] . '/' . $HTTP_POST_VARS[dob_day] . '/' . $HTTP_POST_VARS[dob_year]);

It is also in the main language file.. for me it is includes/languages/english.php

 

define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'm/d/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

May have to change it there as well but I am not sure. If you try any of this be sure you make backups since I am just guessing :)

 

Theres a full contribution that changes all of the USA address formats, dates etc etc into an English format.

Theres also a support thread to that contrib that explains how to do it if you have already installed osc.

 

You dont really need the DOB thing anyway unless your selling adult related products as its irrelevant really IMHO.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...