Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CheckDateRange in general.js (Osc 2.3.4)


vmn

Recommended Posts

Hi,

I changed the Finnish date format to ISO in advanced search.

New define:

In catalog/includes/languages/english/advanced_search.php
define('SEARCH_DATE_FORMAT_STRING', 'mm/dd/yyyy');

In catalog/includes/languages/finnish/advanced_search.php
define('SEARCH_DATE_FORMAT_STRING', 'yyyy-mm-dd');

Changes:

In catalog/includes/languages/finnish.php

define('JQUERY_DATEPICKER_FORMAT', 'yy-mm-dd');
// Return date in raw format
// $date should be in format yyyy-mm-dd
// raw date is in format YYYYMMDD, or DDMMYYYY
function tep_date_raw($date, $reverse = false) {
  if ($reverse) {
    return substr($date,  0, 4) . substr($date, 5, 2) . substr($date, 8, 2);
  } else {
    return substr($date, 8, 2) . substr($date, 5, 2) . substr($date, 0, 4);
  }
}

Then I replaced all 'DOB_FORMAT_STRING' with 'SEARCH_DATE_FORMAT_STRING' in

advanced_search.php
advanced_search_result.php

Link to comment
Share on other sites

  • 1 month later...

Hi, I noticed the same issue in Osc2.3.4 BS Gold, so made the same changes.  Advanced search by date now works ok

 

thanks for the input

 

Mike

@@burt this my need adding/changing in BS Gold etc

osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...