Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Edit orders comments

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
If you delete an existing orders status history entry (with or without comments), the status in the table orders, -> orders_status wasnt updated.

This will fix this bug, just search for:

includes/admin/orders.php


case 'delete_comment_true':
if(isset($HTTP_POST_VARS['comment_id'])){
tep_db_query("DELETE FROM " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_status_history_id = '" . tep_db_input($HTTP_POST_VARS['comment_id']) . "'");
}

Change to:

case 'delete_comment_true':
if(isset($HTTP_POST_VARS['comment_id'])){
tep_db_query("DELETE FROM " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_status_history_id = '" . tep_db_input($HTTP_POST_VARS['comment_id']) . "'");

$osh_id_query = tep_db_query("select MAX(orders_status_history_id) max from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$oID . "'");
$osh_id = tep_db_fetch_array($osh_id_query);

$order_status_query = tep_db_query("select orders_status_id from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$oID . "' and orders_status_history_id ='" . $osh_id['max'] . "'");
$order_status = tep_db_fetch_array($order_status_query);

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . $order_status['orders_status_id'] . "', last_modified = now() where orders_id = '" . (int)$oID . "'");
}

Thats all, have fun!
   Posted on: 12/05/2008     See contribution details Request Installation with Paid service