Exemplo n.º 1
0
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
global $db;
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
include DIR_WS_CLASSES . 'order.php';
$oID = zen_db_prepare_input($_GET['oID']);
$step = zen_db_prepare_input($_POST['step']);
$add_product_categories_id = zen_db_prepare_input($_POST['add_product_categories_id']);
$add_product_products_id = zen_db_prepare_input($_POST['add_product_products_id']);
$add_product_quantity = zen_db_prepare_input($_POST['add_product_quantity']);
// New "Status History" table has different format.
$OldNewStatusValues = zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "old_value") && zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "new_value");
/* $CommentsWithStatus = zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "comments"); */
// $SeparateBillingFields = zen_field_exists(TABLE_ORDERS, "billing_name");
// Default Tax Rate/Percent for Shipping
$AddShippingTax = "0.0";
// e.g. shipping tax of 17.5% is "17.5"
$orders_statuses = array();
$orders_status_array = array();
$orders_status_query = $db->Execute("select orders_status_id, orders_status_name \n  \t\t\t\t\tfrom " . TABLE_ORDERS_STATUS . " \n\t\t\t\t\twhere language_id = '" . (int) $_SESSION['languages_id'] . "'");
#  while ($orders_status = zen_db_fetch_array($orders_status_query)) {
while (!$orders_status_query->EOF) {
    $orders_statuses[] = array('id' => $orders_status_query->fields['orders_status_id'], 'text' => $orders_status_query->fields['orders_status_name']);
    $orders_status_array[$orders_status_query->fields['orders_status_id']] = $orders_status_query->fields['orders_status_name'];
    $orders_status_query->MoveNext();
}
$action = isset($_GET['action']) ? $_GET['action'] : 'edit';
Exemplo n.º 2
0
  - Jonathan Hilgeman, August 7th, 2003
*/
global $db;
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
include DIR_WS_CLASSES . 'order.php';
$oID = zen_db_prepare_input($_GET['oID']);
$step = zen_db_prepare_input($_POST['step']);
$add_product_categories_id = zen_db_prepare_input($_POST['add_product_categories_id']);
$add_product_products_id = zen_db_prepare_input($_POST['add_product_products_id']);
$add_product_quantity = zen_db_prepare_input($_POST['add_product_quantity']);
// New "Status History" table has different format.
$OldNewStatusValues = zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "old_value") && zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "new_value");
/* $CommentsWithStatus = zen_field_exists(TABLE_ORDERS_STATUS_HISTORY, "comments"); */
$SeparateBillingFields = zen_field_exists(TABLE_ORDERS, "billing_name");
// Optional Tax Rate/Percent
$AddShippingTax = "0.0";
// e.g. shipping tax of 17.5% is "17.5"
$orders_statuses = array();
$orders_status_array = array();
$orders_status_query = $db->Execute("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int) $_SESSION['languages_id'] . "'");
#  while ($orders_status = zen_db_fetch_array($orders_status_query)) {
while (!$orders_status_query->EOF) {
    $orders_statuses[] = array('id' => $orders_status_query->fields['orders_status_id'], 'text' => $orders_status_query->fields['orders_status_name']);
    $orders_status_array[$orders_status_query->fields['orders_status_id']] = $orders_status_query->fields['orders_status_name'];
    $orders_status_query->MoveNext();
}
$action = isset($_GET['action']) ? $_GET['action'] : 'edit';
//UPDATE_INVENTORY_QUANTITY_START##############################################################################################################
$order_query = $db->Execute("select products_id, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $oID . "'");