Contributions
order_editor_for2.3_v1.0
Order editor for osCommerce 2.3
This is the 2.3 version of ordereditor from 2.2 (http://addons.oscommerce.com/info/1435)
This was tricky to convert to 2.3 since the new 2.3 is changed alot in the admin side. I work with the latest PHP version and there was a few things that needet to be changed for that version to.
The buttons for this contribution is from 2.2 and needs to be recoded, but for now i release this version so others can help to fix it.
I have not been able to try it alot but it looks like it works as good as the 2.2 version.
/Janne
Mindsparx.org
Expand All / Collapse All
Found more error in ajax update and fixed
Thank you anam_funny inform about error, Fill Free contact me id you found more error.
FULL PACKAGE
Sorry one Sql fix in edit_orders.php file.
Ajax update error and Normal redirect error fix.
FULL PACKAGE ENCLOSED - credit to original author
When we edit order with delete order status history but this order can't update order status to last in the order status history
in edit_orders_ajax.php find
//8. Update the orders_status_history table
if ($action == 'delete_comment') {
tep_db_query("DELETE FROM " . TABLE_ORDERS_STATUS_HISTORY . " WHERE orders_status_history_id = '" . $_GET['cID'] . "' AND orders_id = '" . $_GET['oID'] . "'");
Add after:
$lastorderstatus_query=tep_db_query("select orders_status_id from ".TABLE_ORDERS_STATUS_HISTORY." where orders_id='" . $_GET['oID'] . "' order by orders_status_history_id desc limit 1" );
if (tep_db_num_rows($lastorderstatus_query) > 0) {
$lastorderstatus_data = tep_db_fetch_array($lastorderstatus_query);
tep_db_query("UPDATE " . TABLE_ORDERS . " set orders_status='".$lastorderstatus_data['orders_status_id']."' WHERE orders_id = '" . $_GET['oID'] . "'");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
in edit_orders.php find
if (isset($comments_details['delete'])){
$Query = "DELETE FROM " . TABLE_ORDERS_STATUS_HISTORY . "
WHERE orders_id = '" . (int)$oID . "'
AND orders_status_history_id = '$orders_status_history_id';";
tep_db_query($Query);
Add after:
$lastorderstatus_query=tep_db_query("select orders_status_id from ".TABLE_ORDERS_STATUS_HISTORY." where orders_id='" . $_GET['oID'] . "' order by orders_status_history_id desc limit 1" );
if (tep_db_num_rows($lastorderstatus_query) > 0) {
$lastorderstatus_data = tep_db_fetch_array($lastorderstatus_query);
tep_db_query("UPDATE " . TABLE_ORDERS . " set orders_status='".$lastorderstatus_data['orders_status_id']."' WHERE orders_id = '" . $_GET['oID'] . "'");
Please backup backup before do that!
Fixed the edit_orders.php file to call template top and remove header and column left reference to be compatible with ver 2.3.
FULL PACKAGE ENCLOSED - credit to original author
Order editor for osCommerce 2.3
This is the 2.3 version of ordereditor from 2.2 (http://addons.oscommerce.com/info/1435)
This was tricky to convert to 2.3 since the new 2.3 is changed alot in the admin side. I work with the latest PHP version and there was a few things that needet to be changed for that version to.
The buttons for this contribution is from 2.2 and needs to be recoded, but for now i release this version so others can help to fix it.
I have not been able to try it alot but it looks like it works as good as the 2.2 version.
/Janne
Mindsparx.org
Note: Contributions are used at own risk.