Changing the date format in osCommerce
To change the date format used in osCommerce (when members create their account) from mm/dd/yyyy to dd/mm/yyyy, you simply need to change the main language file. The file should be located at catalog/includes/languages/<language_name>.php (for example: catalog/includes/languages/english.php).
I found the solution at the osCommerce forums in this thread, but it is missing a couple of things that were overlooked.
Change the file from (around 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');////
// 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, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
}
}
To:
Setting up Paypal IPN with osCommerce for Australian Dollars (AUD)
I have just been setting up an osCommerce website to use Paypal's IPN as the payment method to accept credit card and paypal payments. I downloaded the official osCommerce Paypal IPN module from the contributions site, because the one that comes with 2.2MS2 is out of date.
After downloading this and installing it, I made a test order on the osCommerce store, and when I was directed to Paypal the amount to pay was $0.00 USD. As this is an Australian site, dealing in Australian currency (AUD) only, there were 2 problems. The zero order amount, and the fact that it was in USD.