vazash Posted September 9, 2006 Posted September 9, 2006 Hi guys, I am having a problem with the checkout_process.php file. I am using a Linkpoint Secure Credit Card script which I had got from the oscommerce contributions. Since the client is located in an EST timezone, I also had to modify most of the pages to go back 4 hrs. from the current time. I think my problem is with the time...I am not sure... Below is the code from the checkout_process.php page 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '09 Sep, 2006 06:38'1', 'USD', '1.00000000')' at line 1 insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values Since i think it is a problem with the time, I changed the code in the english.php to this 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_LONG', '%m/%d/%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'); This is also the code that i changed in the application_top.php page. // code added by me on 060706 for modifying time define ('TIME', strtotime(gmstrftime("%Y-%m-%d %H:%M:%S", strtotime ("-4 hour")))); //define ('NOW', gmdate ('Y-m-d ', time() -4 *3600)); define ('NOW', gmdate ('D. d M, Y H:i'/*:s*/, time() -4 *3600));//using it in the footer to display across all the pages //end code for modifying time Also in most of the pages I was told to change now() to NOW which is what I have done.
vazash Posted September 9, 2006 Author Posted September 9, 2006 The problem was with the time code itself...but not where i was looking. The answer was in the checkout_process.php file. I had to put the NOW between quotes on lines 92 and 111. Hope this solves somebody else's problems... :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.