Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change format of date in the signup part?


Guest

Recommended Posts

Posted

Is it possibly to change the format of date in the signup part?

 

How can it be done?

 

yymmdd

Posted

in includes/languages/english.php find:

define('DATE_FORMAT', 'm/d/Y');

change to

define('DATE_FORMAT', 'd/m/Y');

Posted
in includes/languages/english.php find:
define('DATE_FORMAT', 'm/d/Y');

change to

define('DATE_FORMAT', 'd/m/Y');

 

 

Thanks, but I mean in that page were the customer wright their own birth date, when they sign up...

 

Is that possibly to change?

Posted

Yes... in that same file, find and change this line...

 

define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');

Posted
Yes... in that same file, find and change this line...

 

define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');

 

Hi. I have been trying to do the same but with no luck.

 

I have changed the areas in the previous posts above that does change the format displayed on screen when a new user opens an account. However, the system still seems to only recognise the american format and so displays a warning message if the date is inserted in british format.

 

Hope i have not confused you.

 

Thanks, mwo

Posted

Did you change the error define directly above it? And if you haven't done so already, you should change this line too...

 

// text for date of birth example
define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

Posted
Did you change the error define directly above it? And if you haven't done so already, you should change this line too...

 

// text for date of birth example
define('DOB_FORMAT_STRING', 'mm/dd/yyyy');

 

Yes I have changed those 2 lines aswell but to no avail.

 

Any other ideas?

 

Thanks, mwo.

Posted

Did you make the changes in admin too? There is a UK-based osc package in contributions... you could take the language files from there.

Posted

I can change the example text, how the date must be written, and also the error message that shows how the date must be writen.

 

But it dont work, even if I wright the date exacley like that, I get the error message.

(I have also shanged number of digits in the OScommerce configuration part)

Posted

I can change the example text, how the date must be written, and also the error message that shows how the date must be writen.

 

But it dont work, even if I wright the date exacley like that, I get the error message.

(I have also shanged number of digits in the OScommerce configuration part)

 

And...while we are talking about this... How do I change the "newsletter" box to be marked as default ?

Posted

But it dont work, even if I wright the date exacley like that, I get the error message.

(I have also shanged number of digits in the OScommerce configuration part)

 

Hi. I have just got it working. Heres what to do:

 

Change the following code to what is in bold below

 

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

}

 

This must be done aswell as the other code changes above.

 

The changes must be made to both english.php files in catalog and admin.

 

Failing all above, download the UK OSCommerce contrib and replace both of the english.php files only.

 

Hope this helps and thanks to all for the help you gave me.

 

Cheers, mwo

Posted
But it dont work, even if I wright the date exacley like that, I get the error message.

(I have also shanged number of digits in the OScommerce configuration part)

Hi. I have just got it working. Heres what to do:

 

Change the following code to what is in bold below

 

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

}

 

This must be done aswell as the other code changes above.

 

The changes must be made to both english.php files in catalog and admin.

 

Failing all above, download the UK OSCommerce contrib and replace both of the english.php files only.

 

Hope this helps and thanks to all for the help you gave me.

 

Cheers, mwo

 

Thanks!

In what way will this show the date? YYMMDD ? or?

Archived

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

×
×
  • Create New...