注文データ削除時にステータス変更 oscommerce
osCommeceでは、管理画面(admin)の注文管理で注文を削除した場合、在庫数を元に戻すことは出来ても、売り切れになったステータスは元に戻りません。
Koshoten.net2でもosCommerceの同じ機能を使用しているので同じことになります。
Koshoten.net2でもosCommerceの同じ機能を使用しているので同じことになります。
これは、admin/includes/functions/general.phpの974行目を次のように変更することで対応できます。
tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . ", products_status = '1' where products_id = '" . $order['products_id'] . "'");
これで注文データを削除する際に「在庫数を元に戻す」チェックを入れていれば、同時にステータスが在庫ありとなります。
http://www.koshoten.net/k2/modules/icontent/index.php?page=13