Huffd Posted December 7, 2003 Share Posted December 7, 2003 If you're using an ECHO Merchant Account and plan to use the excellent contribution edit_orders you'll need to make one small change to keep the totals in sync. But of course this is only required if there is an adjustment to an order, ie shortship. I've already sent a note to the author requesting this be included in the next update. On or about line 303 of edit_orders.php find and replace this code: if($ot_total_id > 0) { // In Database Already - Update $Query = "update " . TABLE_ORDERS_TOTAL . " set title = '$ot_title', text = '$ot_text', value = '$ot_value', sort_order = '$sort_order' where orders_total_id = '$ot_total_id'"; tep_db_query($Query); } else { // New Insert $Query = "insert into " . TABLE_ORDERS_TOTAL . " set orders_id = '$oID', title = '$ot_title', text = '$ot_text', value = '$ot_value', class = '$ot_class', sort_order = '$sort_order'"; tep_db_query($Query); } Replace with this code: if($ot_total_id > 0) { // In Database Already - Update $Query = "update " . TABLE_ORDERS_TOTAL . " set title = '$ot_title', text = '$ot_text', value = '$ot_value', sort_order = '$sort_order' where orders_total_id = '$ot_total_id'"; tep_db_query($Query); $echo_file = 'echo_result.php'; if (file_exists($echo_file)) { $Query = "update " . TABLE_ORDERS . " set final_price = '$ot_value' where orders_id = '$oID'"; tep_db_query($Query); } } else { // New Insert $Query = "insert into " . TABLE_ORDERS_TOTAL . " set orders_id = '$oID', title = '$ot_title', text = '$ot_text', value = '$ot_value', class = '$ot_class', sort_order = '$sort_order'"; tep_db_query($Query); $echo_file = 'echo_result.php'; if (file_exists($echo_file)) { $Query = "update " . TABLE_ORDERS . " set final_price = '$ot_value' where orders_id = '$oID'"; tep_db_query($Query); } } ++++++++++++++++++= If I could dump my day job to write PHP, I'd do it in a heart beat. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.