Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    time offset 1.2.7d order.php error

    Hi,

    I have just installed the time offset module deisgned for 1.2.3. I am running ver.1.2.7d so instead of just copying function_general.php and orders.php i used winmerge to add the new time offset code into the files.

    This seem to of worked fine for functions_general.php but orders.php throws up this error when trying to purchase through the site:
    Fatal error: Call to a member function on a non-object in /var/www/vhosts/ry.com.au/httpdocs/store/includes/classes/order.php on line 827

    Here is the section of code at line 827:
    // lets start with the email confirmation
    // make an array to store the html version
    $html_msg=array();
    // get the order date corrected for time zone offset
    $date_query = "select date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$zf_insert_id . "'";
    "Line 827" $offsetdate = $db->Execute($date_query);
    $orderdate = $offsetdate->fields['date_purchased'];

    Can someone please give me an idea on where this went wrong? The sql file loaded into the database no problem.

    Thanks,
    Brad.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: time offset 1.2.7d order.php error

    One of your updates has busted the connection to the database for that section of code.

    Did you change any lines talking about something like: global $db;

    The error is occurring while the $db->execute is trying to run because $db isn't a known object at this point in the code. This suggests an error earlier in the file...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: time offset 1.2.7d order.php error

    Hi,

    Here is the complete file - orders.php
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: time offset 1.2.7d order.php error

    The most recent 1.2.7 version is available here http://www.nevj.com/time_zone_offset.zip

    courtesy of Bunyip & WigWil

  5. #5
    Join Date
    May 2005
    Posts
    110
    Plugin Contributions
    0

    Default Re: time offset 1.2.7d order.php error

    Hi,

    Great stuff!! Just installed it and it works without errors, thanks heaps.

    Although 1 problem: when the order email goes out it says it was ordered in 1969...

    Brad.

  6. #6
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: time offset 1.2.7d order.php error

    Quote Originally Posted by emtecmedia
    Hi,

    Great stuff!! Just installed it and it works without errors, thanks heaps.

    Although 1 problem: when the order email goes out it says it was ordered in 1969...

    Brad.
    Yes... I do remember that little bug (1.2.7d seems so... long ago )
    I'll check for the fix for that tonight.

  7. #7
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: time offset 1.2.7d order.php error

    Quote Originally Posted by gilby
    Yes... I do remember that little bug (1.2.7d seems so... long ago )
    I'll check for the fix for that tonight.
    Sorry it is too long ago. I seem to have deleted that 127d fix from my computer as I don't use it anymore.

 

 

Similar Threads

  1. Time Zone Offset -- Fixing a SQL syntax error?
    By xman888 in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 16 Apr 2010, 03:38 PM
  2. Time Zone Offset Error
    By 10gallons in forum Basic Configuration
    Replies: 5
    Last Post: 5 Sep 2009, 02:51 AM
  3. Help Error after insert of SQL for time offset mod
    By wmorris in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 8 Nov 2008, 03:03 AM
  4. Time Offset error
    By Bruce1952 in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 1 Sep 2008, 01:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg