SCH_001 Posted May 23, 2019 Share Posted May 23, 2019 Hi all, you will most likely get sick of all my posts soon. As guessed I am setting up a new install So the user side create account page and most likely any of the address pages I can't find which file to edited I want to remove the fax number remove the word Province from State/Province Remove City and make Suburb a required entry or rename City to Suburb and remove what was suburb In the company name field is there away to have the word "Optional" in there <- some people seem to thing every field needs to be filled in (not really an issue) Also while I am here Date format, Please let me know all the places that need to be changed so date is in dd/mm/yyyy etc Link to comment Share on other sites More sharing options...
peterbuzzin Posted May 23, 2019 Share Posted May 23, 2019 1. I want to remove the fax number In create_account.php find (approx line 465) <div class="form-group row"> <label for="inputFax" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_FAX_NUMBER; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('fax', '', 'id="inputFax" placeholder="' . ENTRY_FAX_NUMBER_TEXT . '"', 'tel'); ?> </div> </div Replace with: <!-- <div class="form-group row"> <label for="inputFax" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_FAX_NUMBER; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('fax', '', 'id="inputFax" placeholder="' . ENTRY_FAX_NUMBER_TEXT . '"', 'tel'); ?> </div> </div --> 2. remove the word Province from State/Province In includes/languages/english.php (approx line 111) Find: define('ENTRY_STATE', 'State/Province'); Replace with: define('ENTRY_STATE', 'State'); 3 & 4 Remove City and make Suburb a required entry / or rename City to Suburb and remove what was suburb I'd recommend disabling Suburb and renaming City to Suburb as there's less work involved but this may cause a problem later on if you decide you wish to use the actual suburb field at some point as you'll have existing addresses where the suburb is in the city field and empty suburb fields. But if it wont be an issue then see below. In Admin > Configuration > Customer Details. Edit the suburb entry and change it to false. Then back in includes/languages/english.php (approx line 107) find: define('ENTRY_CITY', 'City'); define('ENTRY_CITY_ERROR', 'Your City must contain a minimum of ' . ENTRY_CITY_MIN_LENGTH . ' characters.'); And replace with: // BOF start of change from city to suburb due to disabling suburb field define('ENTRY_CITY', 'Suburb'); //was previously City define('ENTRY_CITY_ERROR', 'Your Suburb must contain a minimum of ' . ENTRY_CITY_MIN_LENGTH . ' characters.'); // was previously Your City... // EOF start of change from city to suburb due to disabling suburb field 5. In the company name field is there away to have the word "Optional" in there <- some people seem to thing every field needs to be filled in (not really an issue) Still in includes/languages/english.php Find (approx line 81): define('ENTRY_COMPANY_TEXT', ''); And replace with: define('ENTRY_COMPANY_TEXT', '(Optional)'); Also while I am here Date format, Please let me know all the places that need to be changed so date is in dd/mm/yyyy etc Still in includes/languages/english.php Find (approx line 21): 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'); define('JQUERY_DATEPICKER_FORMAT', 'mm/dd/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate Replace with: 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'); define('JQUERY_DATEPICKER_FORMAT', 'dd/mm/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate You'll also need to mirror this in admin Find in admin/includes/languages/english.php (approx line 20): 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('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'mm/dd/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate Replace with: 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'); define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'dd/mm/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate If it still don't work, hit it again! Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information. Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here. Link to comment Share on other sites More sharing options...
MrPhil Posted May 23, 2019 Share Posted May 23, 2019 RE: "where is the text that says..." Link to comment Share on other sites More sharing options...
SCH_001 Posted May 24, 2019 Author Share Posted May 24, 2019 @peterbuzzin A very big thank you for taking the time to answer each question and spelling out exactly what needs to be done. I am still learning coding etc and having replies like this makes it so much easier to learn and understand how it all works. . Link to comment Share on other sites More sharing options...
peterbuzzin Posted May 24, 2019 Share Posted May 24, 2019 No problem at all. I remember when I was starting out 15 years ago with osC and can still remember some of the frustrations I had not knowing where or what to edit and the help I recieved. Good to be able to pay it forward If it still don't work, hit it again! Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information. Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here. Link to comment Share on other sites More sharing options...
SCH_001 Posted May 24, 2019 Author Share Posted May 24, 2019 @peterbuzzin Hi not sure if I should ask this here or start a new topic Still can't get "Date Available:" in admin > edit product (not overly important) or " Expiry Date:" in admin > specials this would not be an issue but the add_on " Quick Update " pulls the date layout from specials according to the author BrockleyJohn. Below is my admin language file with change in red, also why is the setlocale line in the normal language look like @setlocale I have tried google but no explanation //setlocale(LC_ALL, array('en_US.UTF-8', 'en_US.UTF8', 'enu_usa')); setlocale(LC_ALL, array('en_AU.UTF-8', 'en_AU.UTF8', 'ena_au')); 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'); define('JQUERY_DATEPICKER_I18N_CODE', 'en-AU'); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'dd/mm/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate //// // 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); } } Link to comment Share on other sites More sharing options...
peterbuzzin Posted May 24, 2019 Share Posted May 24, 2019 9 minutes ago, supercheaphobb said: this would not be an issue but the add_on " Quick Update " pulls the date layout from specials according to the author BrockleyJohn Would you mind linking me to the addon/contribution so I can take a look at the code? It may not be honouring system wide time formatting, but I'll know more once I see it. If it still don't work, hit it again! Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information. Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here. Link to comment Share on other sites More sharing options...
SCH_001 Posted May 24, 2019 Author Share Posted May 24, 2019 3 minutes ago, peterbuzzin said: Would you mind linking me to the addon/contribution so I can take a look at the code? It may not be honouring system wide time formatting, but I'll know more once I see it. https://apps.oscommerce.com/XpKWd&quick-update-bs Link to comment Share on other sites More sharing options...
peterbuzzin Posted May 24, 2019 Share Posted May 24, 2019 Thanks, so I've taken a look and at the same time realised it's not possible to change the way the date is outputted or entered without making further changes to how the dates are saved. I should have realised sooner before when I initially replied about supplying the code but it's Friday and all I can think about is finishing work and starting the long weekend! lol Sorry! YYYY-MM-DD is native DateTime data type storage in MySQL, so the dates are saved like that. If you wanted to display them as DD-MM-YYYY you would need to change every page that saves a date so that it processes the date in DD-MM-YYYY and then reverses it before storing so it's saved as YYYY-MM-DD and then again on output it would need to be reversed back to DD-MM-YYYY. It's a lot of fiddling for a small thing and you'd need to make that customisation for every page that saves a date and then again if you ever update or install more mods. Generally it's only the shoppers you need to cater for in terms of localisation. If our clients ever ask about it we just say that's how it's stored in the database and can't be changed. Sorry I can't give you a simple solution on this occassion! If it still don't work, hit it again! Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information. Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here. Link to comment Share on other sites More sharing options...
SCH_001 Posted May 24, 2019 Author Share Posted May 24, 2019 @peterbuzzin Many thanks for taking a look, At least it proves I was not insane on it not changing for me... It's a minor inconvenience. Long weekend lucky you Again many thanks Troy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.