Jump to content

Archived

This topic is now archived and is closed to further replies.

rob_illinois

new orders disappearing - need help

Recommended Posts

   I have been having orders disappear on me from time to time. They show up once placed in the admin area no problem, then I go to send an update to the person and check the shipped box. When it updates they order is gone from the admin view. I have to go into the sql db "through phpadmin" and find the order which is at a 0 for status, and not a 1 or 2. Once I update it here to a 1, it shows up again in the admin panel for orders. Ideas on what is going on and how to fix this issue?

 

Thanks

Share this post


Link to post
Share on other sites

Hi there

 

If you look at the orders.php file in your admin folder you'll see (near the top) a chunk of code like:

if (tep_not_null($action)) {
    switch ($action) {
      case 'update_order':
        $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
        $status = tep_db_prepare_input($HTTP_POST_VARS['status']);
        $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

        $order_updated = false;
        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
        $check_status = tep_db_fetch_array($check_status_query);

        if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
          tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

there's a line in there  $status = tep_db_prepare_input($HTTP_POST_VARS['status']);

 

your first port of call is to check if the POST value for status holds anything - you can do this via the Developers Tools in most browsers.

 

If there is nothing in there then that's your problem

Share this post


Link to post
Share on other sites

I have an easy workaround for this issue which I've implemented for a couple of people on osc2.2.

 

It seems that occasionally the order status update fails half way through (I suspect there's some iffy error-handling somewhere but never got round to digging for it).

 

In phpmyadmin create an entry in the orders_status table with id 0 and name 'status error - needs manual reset' (or some other text you prefer).

 

This makes sure the order is still displayed and you can just change it in admin/orders.php


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

×