caccamo81 Posted October 7, 2008 Posted October 7, 2008 (edited) http://addons.oscommerce.com/info/6287 English (I hope!) Support here The Birthdate combo select contribution provides the following enhancements to the Create Account and Edit Account features of osCommerce: -Date of birth's field is now divided into three combo select, ones for day, month and year With this plugin, users simply have to choise a date from a combo select (drop down) without thinking the date format (xx/xx/xxxx). Administrator has not this functionality. Italian language is also disponible by requesting mail. Edited October 7, 2008 by caccamo81 Quote
Hotclutch Posted October 7, 2008 Posted October 7, 2008 http://addons.oscommerce.com/info/6287 English (I hope!) Support here The Birthdate combo select contribution provides the following enhancements to the Create Account and Edit Account features of osCommerce: -Date of birth's field is now divided into three combo select, ones for day, month and year With this plugin, users simply have to choise a date from a combo select (drop down) without thinking the date format (xx/xx/xxxx). Administrator has not this functionality. Italian language is also disponible by requesting mail. Hi Nice contrib...will make things easier for the user, thanks. Where do I change the date format so that I have ddMMYYYY. OsCommerce uses MMddYYYY by default. Quote
caccamo81 Posted October 7, 2008 Author Posted October 7, 2008 (edited) I had not thinking in this problem, italy use ddMMYYYY as date format. First, you must modify the order of the http_post_vars: this code if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['day_dob']."/".$HTTP_POST_VARS['month_dob']."/".$HTTP_POST_VARS['year_dob']); can be change in if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['month_dob']."/".$HTTP_POST_VARS['day_dob']."/".$HTTP_POST_VARS['year_dob']); ---------- Second, you have to change the order of the comboboxes. --------- finally you have to change this: in the day block: if($i==(int)substr(tep_date_short($account['customers_dob']),0,2)) replace with if($i==(int)substr(tep_date_short($account['customers_dob']),3,2)) in the month block: if($i==(int)substr(tep_date_short($account['customers_dob']),3,2)) replace with if($i==(int)substr(tep_date_short($account['customers_dob']),0,2)) I have not test this modification, but I think it probably works Edited October 7, 2008 by caccamo81 Quote
Hotclutch Posted October 8, 2008 Posted October 8, 2008 Hi Thanks for your reply... I actually meant Where do you change the date format in OsCommerce because we also use the date format ddMMYYYY here in South Africa. Nothing wrong with your code. But I found where to do that. In catalog\includes\languages\english.php just edit to this 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'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY 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); } } Quote
Sylvester99 Posted January 25, 2009 Posted January 25, 2009 Hi Thanks for your reply... I actually meant Where do you change the date format in OsCommerce because we also use the date format ddMMYYYY here in South Africa. Nothing wrong with your code. But I found where to do that. In catalog\includes\languages\english.php just edit to this 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'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY 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); } } I think these changes will also need to be done in catalog\admin\includes\languages\english.php if you want dd/mm/yyyy in admin. Quote
toclante Posted February 19, 2009 Posted February 19, 2009 hello, nice contribution. I've just installed and when i try to select Year, i'm only allowed to select "2009". Do you have any idea how to solve this? Thank you Quote
tfbpa Posted March 3, 2009 Posted March 3, 2009 (edited) I had the same problem, not sure why because the age is selected in english.php, but anyway I just hard-coded it. Is also easier when you have many different languages Look for the following code in both files $startYear=$today['year']-MAX_SELL_AGE; $endYear=$today['year']-MIN_SELL_AGE; and just fill in the years, for example like $startYear=$today['year']-100; $endYear=$today['year']-1; Edited March 3, 2009 by tfbpa Quote
oldschoo Posted July 18, 2009 Posted July 18, 2009 My dates are messed up. date of birth entry pull down has the 3 seperate pull downs for month, day, year. The Month pull down goes to 31 and the day pull down goes to 12. The year is correct. How do I change them around? Quote
oldschoo Posted July 18, 2009 Posted July 18, 2009 I figured it out. I just switched the code around in two files for the month and day Quote
kahlo Posted April 26, 2011 Posted April 26, 2011 Hello, sorry for my english. I install de contribution more weeks ago and all is allright, but today one client send me a email because he can't create a account because he have a problem with the date of birth. Always the problem say: "select your date of birth". I try a create account but i have the same problem, and i try with differents days, months and years but always appear the error. I unistall the contribution and install one more time, but the problem is here. What happen? Thanks! Quote
fenix12585 Posted March 5, 2013 Posted March 5, 2013 Hello, Can anyone help with this? I have been looking to see if it has been resolved, but none of the standard help locations mention it. This is a great contribution, but I simply do not know how to fix this one issue. It come up when a customer is trying to edit their account information. The birthday shows up partially filled out and partially at default values. This confuses the customer and forces them to call or try to change the information over and over. I have attached a .jpg file and my account_edit.php for reference. If you need anything else please let me know! My understanding of the code is very basic. I can modify most files and use comparison programs. Thank You All for your help! account_edit.php Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.