olsonsp4c Posted November 17, 2006 Share Posted November 17, 2006 Hello, I'm getting the following error in checkout_process.php when my customers use paypal to pay: 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 'where date_format(store_history_date, '%Y%m%d') = date_format( update store_history set amount_orders = amount_orders + 1, amount_products = amount_products+1, orders_price=orders_price+ where date_format(store_history_date, '%Y%m%d') = date_format(now(), '%Y%m%d') [TEP STOP] I have modified paypal.php to include the same changes as made to checkout_process.php any thoughts? thanks! Scott Figured out the issue - it was not with time Zone, but with a contrib called Stats v3 - you just should NOT copy the lines inserted into checkout_process.php into paypal.php Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Joe2007 Posted December 6, 2006 Share Posted December 6, 2006 This is my first contribution (and first post too!) I have made the changes required to get the order confirm emails as well as order status changes working. In addition, the date that appears in the footer has been fixed too. I have written a function to get the current database time and add the offset to it. You can then use it whenever you need the offset time (even outside of this contrib) For people that are finding that the date is not changed in every place, I have added a comment at the end of the instructions. The most important parts of the application are fixed here (emails and visible date on site). You will need to modify a lot of files if you want to fix everything! Thanks dr_lucas for your contribution. To be honest, from what I have read, the TZ is mostly ignored. I rely on the database date and add the offset and it seems to all work OK. Contribution located at http://www.oscommerce.com/community/contributions,4156 Thanks for your contribute marty, works great! Do you have a solution for the time/date in the admin control panel/orders as well? Cheers. Quote Link to comment Share on other sites More sharing options...
Joe2007 Posted December 6, 2006 Share Posted December 6, 2006 Thanks for your contribute marty, works great! Do you have a solution for the time/date in the admin control panel/orders as well? Cheers. Yeah well i've just had a second look and as mentioned before - it's the database time which doesn't change. Mind to guide? Cheers. Quote Link to comment Share on other sites More sharing options...
Jayman007 Posted May 16, 2007 Share Posted May 16, 2007 You are right about that, it's the same on my system, with the old mod, and it's because its' code isn't standard osCommerce code. It also does not use the now() function, and that is why the time and date are showing in PST instead of Central. I am also using the excellent user tracking contribution (http://www.oscommerce.com/community/contributions,1055) and it works fine there simply because it's written according to osC standards... You may want to replace your visitors mod with the updated one: http://www.oscommerce.com/community/contributions,4067 I have this mod installed as well and the times in the visitor plugin are NOT being effected by the TZ offset. Also, when order emails are generated and mailed I am still seeing the original server time on the emails instead of the offset time. Any help/suggestions would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted June 23, 2007 Author Share Posted June 23, 2007 I have this mod installed as well and the times in the visitor plugin are NOT being effected by the TZ offset. Also, when order emails are generated and mailed I am still seeing the original server time on the emails instead of the offset time. Any help/suggestions would be greatly appreciated. You should revise all occurences of now() in your /catalog/includes/visitors_count.php file to be as suggested in marty's latest update to this mod. Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
cgmaster Posted July 29, 2007 Share Posted July 29, 2007 Hi, Just installed this contribution!! well done, works well to a point, that is if your time zone is in a whole hour ie +2 or -2 but what about if your time zone is +2.5 or -2.5?? I have managed to get the TZ to match from my hosted server... as in correct local time for server, but how do I set this in admin to get the correct local time for orders etc as my times are always 30 mins out with the server time!!! any suggestions or help on this would be great, Thanks Quote Link to comment Share on other sites More sharing options...
cheeroke Posted May 10, 2009 Share Posted May 10, 2009 Hi all, I hope this contrib is still supported in this treat. I got problem in footer or actually in the way it show date in footer as it is shown thice. Has anyone got any idea where is mistake? I will be appreciated for any clue. Quote Link to comment Share on other sites More sharing options...
cheeroke Posted May 10, 2009 Share Posted May 10, 2009 Anyone, any idea? Maybe someone is still using this contribution? If not, which one would you recommend? regards Quote Link to comment Share on other sites More sharing options...
cheeroke Posted May 10, 2009 Share Posted May 10, 2009 Anyone, any idea?Maybe someone is still using this contribution? If not, which one would you recommend? regards ok, i found where was the problem, I did not recognize correctly where php ends and tried to comment part of code using html comment metod. Quote Link to comment Share on other sites More sharing options...
missmolly Posted June 6, 2009 Share Posted June 6, 2009 Have installed this patch - works great in the admin panel - however when I go to the site it displays the following message and I cant get any further. PLEASE HELP 1298 - Unknown or incorrect time zone: 'CONFIG_TIME_ZONE' SET time_zone='CONFIG_TIME_ZONE' [TEP STOP] Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted June 6, 2009 Share Posted June 6, 2009 Did you run the sql steps in the installation process? Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
missmolly Posted June 6, 2009 Share Posted June 6, 2009 No :blink: which part of the install should be run in sql???? I have just re-read everything and no mention of running any part - YES, I'm still learning. Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted June 6, 2009 Share Posted June 6, 2009 Just had a look at 5432 and it is not sql but 5. in the file catalog\includes\configure.php add the following code to the end of the file, but before the ending ?> :- define('CONFIG_TIME_ZONE', '+10:00'); // add 10 hours to the time in mysql server. Your location may require some other value 6. in the file catalog\admin\includes\configure.php add the following code to the end of the file, but before the ending ?> :- define('CONFIG_TIME_ZONE', '+10:00'); // add 10 hours to the time in mysql server. Your location may require some other value Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
missmolly Posted June 6, 2009 Share Posted June 6, 2009 Thanks heaps for your response. Im in Oz too and the +10:00 suits me fine. I followed all the steps dilligently including the ones you mentioned, and still got the error. Whilst undoing all the changes, I thought about the +10:00 - this would put us Aussies out during daylight saving time - when we have it the difference is +11:00 and when we go off and you guys go on then its +9:00. This would mean having to do a manual adjustment at the start and end of Daylight Savings Time. Did a quickie fix, good enough for me - The files named in steps 1 and 2 being the two english.php - close to the top of the file, I comented out setlocale(LC_TIME, 'en_US.ISO_8859-1'); and inserted on the next line putenv("TZ=Australia/Victoria"); //this being appropriate for my area. It works perfectly everywhere, except and there is always one - In Admin Customer Orders the date is correct but but the time is about 5 hours behind. Everything else that I have tested, incl emails had the time spot on to my local time. I think that I am happy with that. Thanks again Tanya Quote Link to comment Share on other sites More sharing options...
PiLLaO Posted February 1, 2011 Share Posted February 1, 2011 Hello, Will be possible to add this fix en categories.php? When I add or udpate a product, it take the server time... Regards!! Quote Link to comment Share on other sites More sharing options...
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.