osCmax v2.5 User Manual
Results 1 to 8 of 8

Update order status using edit_orders.php makes the order disappear

This is a discussion on Update order status using edit_orders.php makes the order disappear within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; Hi all Here's the scenario: I have a client whose store uses OSCMax RC2 v3. The store has been around ...

      
  1. #1
    New Member
    Join Date
    Jul 2007
    Posts
    11
    Rep Power
    0


    Default Update order status using edit_orders.php makes the order disappear

    Hi all
    Here's the scenario:

    I have a client whose store uses OSCMax RC2 v3. The store has been around for a few years (previously it was v1.7) and the database is quite large.

    Recently two orders have gone 'missing' after the client has updated the status using the edit_orders.php file in Admin.

    Checking the database shows that the problem is being caused by a null value being written to the status history table by that file. The Admin can no longer 'see' the order because of the zero value.

    A bodgeit fix is to create a new entry in the order status table of '0' 'Retrieved'. This allows the order to be 'seen' again in the orders.php file and the status can be updated from there (although edit_orders.php still will not update it).

    This has only happenned in two orders out of hundreds and I can see no correlation between them that could account for this.

    I have been through edit_orders.php with a fine toothcomb and I cannot see any reason for the problem (I cannot replicate it at all on the testing server) nor can I 'break' a test order on the live server. The code for writing to the status history table is the same as that in orders.php and I cannot find any reason for a null value being passed by the script.

    (It also will not update any comments added whether or not the status is changed)

    Google suggests a similar problem with ZenCart but there is no suggested solution.

    Whilst I have a quick and dirty fix in place for my client I was wondering if anybody had come across this before and has a proper fix for it (my client is very thorough about keeping her order records up to date so is aware if any go 'missing' if she were not then this would cause a problem as it appears to be totally random - I don't think it's a server problem as it always occurs for these two orders - e.g. if I reset the value to 'Pending' using orders.php and then edit again using edit_orders.php the null value is returned)

    Has anybody come across this before?

    Regards

    Graeme

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Update order status using edit_orders.php makes the order disappear

    I have never seen this specific issue, but if your store is upgraded from v1.7, perhaps a problem with the database upgrade? I really am not sure though, as I cannot reproduce the issue. I have not seen any other reports here about this in all the years I have been developing osCMax, so whatever the issue, it seems very isolated, perhaps unique to your store.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Jul 2007
    Posts
    11
    Rep Power
    0


    Default Re: Update order status using edit_orders.php makes the order disappear

    Quote Originally Posted by michael_s View Post
    I have never seen this specific issue, but if your store is upgraded from v1.7, perhaps a problem with the database upgrade? I really am not sure though, as I cannot reproduce the issue. I have not seen any other reports here about this in all the years I have been developing osCMax, so whatever the issue, it seems very isolated, perhaps unique to your store.
    Hi Micahel

    This one has me baffled - I've not come across it before in any osC/oscMax/CRE store that I've worked on - with this store we are only talking two out of nearly 6000 orders to date.

    I cannot find any reason at all in the code or the database for it so I think I'll award to 'the gremlins'.

    Thank you for taking the time to have a look.

    Graeme

  4. #4
    Active Member
    Join Date
    Jun 2008
    Posts
    195
    Rep Power
    4


    Default Re: Update order status using edit_orders.php makes the order disappear

    Michael, sorry to post...but I had one also similar today. As mentioned, this is the first time really working on a production site with osCMax.

    I have been keep track of the store, to make sure it works...and I know there was an order...I went in and clicked on Details (or edit) this am...and then it disappeared.

    The other strange thing, is that when I create an account thru admin, and then I'll go create an order...the order totals end up printing:
    (foreign language output) when looking in details...

    yet, via the cart online...this does not happen.. This is strange...

    Sous-Total :$1.00Réduction :$0.00Livraison :$0.00Total :$1.00

  5. #5
    New Member
    Join Date
    Jul 2007
    Posts
    11
    Rep Power
    0


    Default Re: Update order status using edit_orders.php makes the order disappear

    Hi there

    Look in the file admin/create_order_process.php - lines 97 onwards you'll see the PHP that writes to the database - there's French used there so all you have to do is substitute your own language translation.

    Graeme

  6. #6
    New Member
    Join Date
    Feb 2009
    Posts
    15
    Rep Power
    0


    Default Re: Update order status using edit_orders.php makes the order disappear

    I've made the english transtions for this but there is another issue when creating an order this way.

    The totals appear in a strange order, I have found in the sql where to change the sort ordre but that only effects that single order. How do I change the order before it is sent to the sql?

    Thanks

  7. #7
    Active Member
    Join Date
    Jun 2008
    Posts
    195
    Rep Power
    4


    Default Re: Update order status using edit_orders.php makes the order disappear

    Rhino!!

    Thx for the post, meaning

    1) I have not done my translations yet...and need to.

    2) You're bringing up a good point here, that I saw... and the reason I didn't pursue it...was because due to the fact that it's "not my site"...and LIVE... (where I couldn't go in and ente a manual order)...well, I can...but it'd screw things up...

    I also "saw this", as

    Hang on, I'll go see if I can find it.

  8. #8
    Active Member
    Join Date
    Jun 2008
    Posts
    195
    Rep Power
    4


    Default Re: Update order status using edit_orders.php makes the order disappear

    OK, I am back...

    Here is how I found the "BUG" a few days ago..while creating a qwik csv report.

    JPH? (lol) You can copy/paste...no need to read..(lol) Just another dig...my brother.

    Anyway, name it whatever you want, In my OO (Open Office) I have to select "Semicolon" on top of the defaulted comma... ( I haven't got back to twaking the exoprt, still trying to do simple things with this cart)

    a: Bundles up down/diry sales
    b: Displays in Spreadsheet
    c: I had one screwed up, but as mentioned...I haven't had time...nor the energy to report it yet, as I just figured a GLITCH.. But that is why I posted...as "I THINK" my guy using this cart...did a manual entry...and that is ALL I need to do for him, successfully, and error free.. <lol> I am laughing....but very tired...

    d: I think?? It has something to do other than "just changing things to English? And the BUG is deeper? I don't know...that's why we are both here today.

    e: I would suspect that you are seeing, similar to what has happened using the below code? Somethere, place impropery...but "deeper code" ina MANUAL entry..

    It seems, that ?? this ?? is the only place it shows up? I don't know... My guy wants "reports"... I was working on this on 2/19, now I am on the 2/20 problem on these forums.

    Please try code, change credentials for DBCONN and let me know?

    THX!!

    Code:
    <?php
    $host = 'localhost';
    $user = 'change_me';
    $pass = 'change_me';
    $db = 'change_me';
    $table = 'orders_products';
    $file = 'export';
    $link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error());
    mysql_select_db($db) or die("Can not connect.");
    $result = mysql_query("SHOW COLUMNS FROM ".$table."");
    $i = 0;
    if (mysql_num_rows($result) > 0) {
    while ($row = mysql_fetch_assoc($result)) {
    $csv_output .= $row['Field']."; ";
    $i++;
    }
    }
    $csv_output .= "\n";
    $values = mysql_query("SELECT * FROM ".$table."");
    while ($rowr = mysql_fetch_row($values)) {
    for ($j=0;$j<$i;$j++) {
    $csv_output .= $rowr[$j]."; ";
    }
    $csv_output .= "\n";
    }
    $filename = $file."_".date("Y-m-d_H-i",time());
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: csv" . date("Y-m-d") . ".csv");
    header( "Content-disposition: filename=".$filename.".csv");
    print $csv_output;
    exit;
    ?>
    Last edited by trochia; 02-22-2009 at 08:03 AM.

Similar Threads

  1. osCMax Development Update : Order Editor, Manual Order Maker
    By michael_s in forum Announcement Discussions
    Replies: 8
    Last Post: 09-15-2008, 03:46 AM
  2. Wrong link in update email order status
    By denharrow in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 03-26-2008, 04:40 PM
  3. order status update problem
    By zuqaili in forum Paypal
    Replies: 0
    Last Post: 06-16-2007, 08:52 AM
  4. Update Order Status in Admin and Tax
    By daffodil in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 06-26-2006, 09:23 AM
  5. Modifying Emails -- Update Order Status
    By pgowder in forum osCommerce 2.2 Modification Help
    Replies: 5
    Last Post: 07-16-2005, 02:37 AM

Bookmarks

Posting Permissions

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