VD : debug require_once('../logger/include.php'); // <- VD require('includes/application_top.php'); // include the appropriate functions & classes include('order_editor/functions.php'); include('order_editor/cart.php'); include('order_editor/order.php'); include('order_editor/shipping.php'); include('order_editor/http_client.php'); // Include currencies class require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // my_phptrace("edit_order - begin"); //orders status $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = tep_db_query("SELECT orders_status_id, orders_status_name FROM " . TABLE_ORDERS_STATUS . " WHERE language_id = '" . (int)$languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } $action = (isset($_GET['action']) ? $_GET['action'] : 'edit'); $firephp->log($action, 'edit_orders.php : action'); if (isset($action)) { switch ($action) { //// // Update Order case 'update_order': $oID = tep_db_prepare_input($_GET['oID']); $status = tep_db_prepare_input($_POST['status']); // Set this Session's variables if (isset($_POST['billing_same_as_customer'])) $_SESSION['billing_same_as_customer'] = $_POST['billing_same_as_customer']; if (isset($_POST['shipping_same_as_billing'])) $_SESSION['shipping_same_as_billing'] = $_POST['shipping_same_as_billing']; // Update Order Info //figure out the new currency value $currency_value_query = tep_db_query("SELECT value FROM " . TABLE_CURRENCIES . " WHERE code = '" . $_POST['update_info_payment_currency'] . "'"); $currency_value = tep_db_fetch_array($currency_value_query); //figure out the country, state $update_customer_state = tep_get_zone_name($_POST['update_customer_country_id'], $_POST['update_customer_zone_id'], $_POST['update_customer_state']); $update_customer_country = tep_get_country_name($_POST['update_customer_country_id']); $update_billing_state = tep_get_zone_name($_POST['update_billing_country_id'], $_POST['update_billing_zone_id'], $_POST['update_billing_state']); $update_billing_country = tep_get_country_name($_POST['update_billing_country_id']); $update_delivery_state = tep_get_zone_name($_POST['update_delivery_country_id'], $_POST['update_delivery_zone_id'], $_POST['update_delivery_state']); $update_delivery_country = tep_get_country_name($_POST['update_delivery_country_id']); // -> OSC-1 : suppression des '/' après mise à jour sans AJAX $sql_data_array = array( 'customers_name' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_name']))), 'customers_company' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_company']))), 'customers_street_address' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_street_address']))), 'customers_suburb' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_suburb']))), 'customers_city' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_city']))), 'customers_state' => stripslashes(tep_db_input(tep_db_prepare_input($update_customer_state))), 'customers_postcode' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_postcode']))), 'customers_country' => stripslashes(tep_db_input(tep_db_prepare_input($update_customer_country))), 'customers_telephone' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_telephone']))), 'customers_email_address' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_customer_email_address']))), 'billing_name' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_name'] : $_POST['update_billing_name'])))), 'billing_company' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_company'] : $_POST['update_billing_company'])))), 'billing_street_address' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_street_address'] : $_POST['update_billing_street_address'])))), 'billing_suburb' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_suburb'] : $_POST['update_billing_suburb'])))), 'billing_city' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_city'] : $_POST['update_billing_city'])))), 'billing_state' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $update_customer_state : $update_billing_state)))), 'billing_postcode' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_postcode'] : $_POST['update_billing_postcode'])))), 'billing_country' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['billing_same_as_customer']) && $_POST['billing_same_as_customer'] == 'on') ? $update_customer_country : $update_billing_country)))), 'delivery_name' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_name'] : $_POST['update_billing_name']) : $_POST['update_delivery_name'])))), 'delivery_company' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_company'] : $_POST['update_billing_company']) : $_POST['update_delivery_company'])))), 'delivery_street_address' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_street_address'] : $_POST['update_billing_street_address']) : $_POST['update_delivery_street_address'])))), 'delivery_suburb' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_suburb'] : $_POST['update_billing_suburb']) : $_POST['update_delivery_suburb'])))), 'delivery_city' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_city'] : $_POST['update_billing_city']) : $_POST['update_delivery_city'])))), 'delivery_state' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $update_customer_state : $update_billing_state) : $update_delivery_state)))), 'delivery_postcode' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $_POST['update_customer_postcode'] : $_POST['update_billing_postcode']) : $_POST['update_delivery_postcode'])))), 'delivery_country' => stripslashes(tep_db_input(tep_db_prepare_input(((isset($_POST['shipping_same_as_billing']) && $_POST['shipping_same_as_billing'] == 'on') ? (($_POST['billing_same_as_customer'] == 'on') ? $update_customer_country : $update_billing_country) : $update_delivery_country)))), 'payment_method' => stripslashes(tep_db_input(tep_db_prepare_input($_POST['update_info_payment_method']))), 'currency' => tep_db_input(tep_db_prepare_input($_POST['update_info_payment_currency'])), 'currency_value' => tep_db_input(tep_db_prepare_input($currency_value['value'])), 'cc_type' => tep_db_prepare_input($_POST['update_info_cc_type']), 'cc_owner' => tep_db_prepare_input($_POST['update_info_cc_owner']), 'cc_number' => tep_db_input(tep_db_prepare_input($_POST['update_info_cc_number'])), 'cc_expires' => tep_db_prepare_input($_POST['update_info_cc_expires']), 'last_modified' => 'now()', 'orders_comments' => tep_db_prepare_input($_POST['general_comment'])); // <- OSC-1 : suppression des '/' après mise à jour sans AJAX // echo tep_db_input(tep_db_prepare_input($_POST['update_customer_name'])); // var_dump($sql_data_array); tep_db_perform(TABLE_ORDERS, $sql_data_array, 'update', 'orders_id = \'' . tep_db_input($oID) . '\''); $order_updated = true; // UPDATE STATUS HISTORY & SEND EMAIL TO CUSTOMER IF NECESSARY ##### $check_status_query = tep_db_query(" SELECT customers_name, customers_email_address, orders_status, date_purchased FROM " . TABLE_ORDERS . " WHERE orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); if (($check_status['orders_status'] != $_POST['status']) || (tep_not_null($_POST['comments']))) { tep_db_query("UPDATE " . TABLE_ORDERS . " SET orders_status = '" . tep_db_input($_POST['status']) . "', last_modified = now() WHERE orders_id = '" . (int)$oID . "'"); // Notify Customer ? $customer_notified = '0'; if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) { $notify_comments = ''; if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, stripslashes(($_POST['comments']))) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE2); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("INSERT into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . tep_db_input($_GET['oID']) . "', '" . tep_db_input($_POST['status']) . "', now(), " . tep_db_input($customer_notified) . ", '" . tep_db_input(tep_db_prepare_input($_POST['comments'])) . "')"); // '" . tep_db_input(html_entity_decode(stripslashes(tep_db_prepare_input($_POST['comments'])))) . "')"); } // Update Products if (is_array($_POST['update_products'])) { foreach($_POST['update_products'] as $orders_products_id => $products_details) { // Update Inventory Quantity $order_query = tep_db_query(" SELECT products_id, products_quantity FROM " . TABLE_ORDERS_PRODUCTS . " WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '" . (int)$orders_products_id . "'"); $order_products = tep_db_fetch_array($order_query); // First we do a stock check if ($products_details['qty'] != $order_products['products_quantity']){ $quantity_difference = ($products_details['qty'] - $order_products['products_quantity']); if (STOCK_LIMITED == 'true'){ tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity - " . $quantity_difference . ", products_ordered = products_ordered + " . $quantity_difference . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } else { tep_db_query ("UPDATE " . TABLE_PRODUCTS . " SET products_ordered = products_ordered + " . $quantity_difference . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } } if ( (isset($products_details['delete'])) && ($products_details['delete'] == 'on') ) { //check first to see if product should be deleted //update quantities first if (STOCK_LIMITED == 'true'){ tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity + " . $products_details["qty"] . ", products_ordered = products_ordered - " . $products_details["qty"] . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } else { tep_db_query ("UPDATE " . TABLE_PRODUCTS . " SET products_ordered = products_ordered - " . $products_details["qty"] . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } tep_db_query("DELETE FROM " . TABLE_ORDERS_PRODUCTS . " WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '" . (int)$orders_products_id . "'"); tep_db_query("DELETE FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '" . (int)$orders_products_id . "'"); tep_db_query("DELETE FROM " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " WHERE orders_id = '" . (int)$oID . "' AND orders_products_id = '" . (int)$orders_products_id . "'"); } else { //not deleted=> updated // Update orders_products Table ?> OSC-1 : Edition des produits livres dans les commandes ?> $attributes_details) { $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " set products_options = '" . $attributes_details["option"] . "', products_options_values = '" . $attributes_details["value"] . "', options_values_price ='" . $attributes_details["price"] . "', price_prefix ='" . $attributes_details["prefix"] . "' where orders_products_attributes_id = '$orders_products_attributes_id';"; tep_db_query($Query); }//end of foreach($products_details["attributes"] }// end of if(isset($products_details[attributes])) } //end if/else product details delete= on } //end foreach post update products }//end if is-array update products //update any downloads that may exist if (is_array($_POST['update_downloads'])) { foreach($_POST['update_downloads'] as $orders_products_download_id => $download_details) { $Query = "UPDATE " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " SET orders_products_filename = '" . $download_details["filename"] . "', download_maxdays = '" . $download_details["maxdays"] . "', download_count = '" . $download_details["maxcount"] . "' WHERE orders_id = '" . (int)$oID . "' AND orders_products_download_id = '$orders_products_download_id';"; tep_db_query($Query); } } //end downloads //delete or update comments if (is_array($_POST['update_comments'])) { foreach($_POST['update_comments'] as $orders_status_history_id => $comments_details) { 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); } else { // -> VD : suppression des caracteres bizarres dans les commentaires mises a jour $Query = "UPDATE " . TABLE_ORDERS_STATUS_HISTORY . " SET comments = '" . tep_db_input(tep_db_prepare_input($comments_details["comments"])) . "' WHERE orders_id = '" . (int)$oID . "' AND orders_status_history_id = '$orders_status_history_id';"; tep_db_query($Query); // <- VD } } }//end comments update section $shipping = array(); if (is_array($_POST['update_totals'])) { foreach($_POST['update_totals'] as $total_index => $total_details) { extract($total_details, EXTR_PREFIX_ALL, "ot"); if ($ot_class == "ot_shipping") { $shipping['cost'] = $ot_value; $shipping['title'] = $ot_title; $shipping['id'] = $ot_id; } // end if ($ot_class == "ot_shipping") } //end foreach } //end if is_array if (tep_not_null($shipping['id'])) { tep_db_query("UPDATE " . TABLE_ORDERS . " SET shipping_module = '" . $shipping['id'] . "' WHERE orders_id = '" . (int)$oID . "'"); } $order = new manualOrder($oID); $order->adjust_zones(); $cart = new manualCart(); $cart->restore_contents($oID); $total_count = $cart->count_contents(); $total_weight = $cart->show_weight(); // Get the shipping quotes- if we don't have shipping quotes shipping tax calculation can't happen $shipping_modules = new shipping; $shipping_quotes = $shipping_modules->quote(); if (DISPLAY_PRICE_WITH_TAX == 'true') {//extract the base shipping cost or the ot_shipping module will add tax to it again $module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_')); $tax = tep_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); $order->info['total'] -= ( $order->info['shipping_cost'] - ($order->info['shipping_cost'] / (1 + ($tax /100))) ); $order->info['shipping_cost'] = ($order->info['shipping_cost'] / (1 + ($tax /100))); } //this is where we call the order total modules require( 'order_editor/order_total.php'); $order_total_modules = new order_total(); $order_totals = $order_total_modules->process(); $current_ot_totals_array = array(); $current_ot_titles_array = array(); $current_ot_totals_query = tep_db_query("select class, title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$oID . "' order by sort_order"); while ($current_ot_totals = tep_db_fetch_array($current_ot_totals_query)) { $current_ot_totals_array[] = $current_ot_totals['class']; $current_ot_titles_array[] = $current_ot_totals['title']; } tep_db_query("DELETE FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . (int)$oID . "'"); $j=1; //giving something a sort order of 0 ain't my bag baby $new_order_totals = array(); if (is_array($_POST['update_totals'])) { //1 foreach($_POST['update_totals'] as $total_index => $total_details) { //2 extract($total_details, EXTR_PREFIX_ALL, "ot"); if (!strstr($ot_class, 'ot_custom')) { //3 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { //4 $firephp->table('edit_orders : order_totals', $order_totals); if ($order_totals[$i]['code'] == 'ot_tax') { //5 $new_ot_total = ((in_array($order_totals[$i]['title'], $current_ot_titles_array)) ? false : true); } else { //within 5 $new_ot_total = ((in_array($order_totals[$i]['code'], $current_ot_totals_array)) ? false : true); } //end 5 if ($order_totals[$i]['code'] == 'ot_tax') if ( ( ($order_totals[$i]['code'] == 'ot_tax') && ($order_totals[$i]['code'] == $ot_class) && ($order_totals[$i]['title'] == $ot_title) ) || ( ($order_totals[$i]['code'] != 'ot_tax') && ($order_totals[$i]['code'] == $ot_class) ) ) { //6 //only good for components that show up in the $order_totals array if ($ot_title != '') { //7 $new_order_totals[] = array('title' => $ot_title, 'text' => (($ot_class != 'ot_total') ? $order_totals[$i]['text'] : '' . $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']) . ''), 'value' => (($order_totals[$i]['code'] != 'ot_total') ? $order_totals[$i]['value'] : $order->info['total']), 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } else { //within 7 $order->info['total'] += ($ot_value*(-1)); $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; } //end 7 } elseif ( ($new_ot_total) && (!in_array($order_totals[$i]['title'], $current_ot_titles_array)) ) { //within 6 $new_order_totals[] = array('title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $current_ot_totals_array[] = $order_totals[$i]['code']; $current_ot_titles_array[] = $order_totals[$i]['title']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; //echo $order_totals[$i]['code'] . "
"; for debugging- use of this results in errors } elseif ($new_ot_total) { //also within 6 $order->info['total'] += ($order_totals[$i]['value']*(-1)); $current_ot_totals_array[] = $order_totals[$i]['code']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; }//end 6 $firephp->table('edit_orders : new_order_totals', $new_order_totals); }//end 4 } elseif ( (tep_not_null($ot_value)) && (tep_not_null($ot_title)) ) { // this modifies if (!strstr($ot_class, 'ot_custom')) { //3 $new_order_totals[] = array('title' => $ot_title, 'text' => $currencies->format($ot_value, true, $order->info['currency'], $order->info['currency_value']), 'value' => $ot_value, 'code' => 'ot_custom_' . $j, 'sort_order' => $j); $order->info['total'] += $ot_value; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } //end 3 //save ot_skippy from certain annihilation if ( (!in_array($ot_class, $written_ot_totals_array)) && (!in_array($ot_title, $written_ot_titles_array)) && (tep_not_null($ot_value)) && (tep_not_null($ot_title)) && ($ot_class != 'ot_tax') && ($ot_class != 'ot_loworderfee') ) { //7 //this is supposed to catch the oddball components that don't show up in $order_totals $new_order_totals[] = array( 'title' => $ot_title, 'text' => $currencies->format($ot_value, true, $order->info['currency'], $order->info['currency_value']), 'value' => $ot_value, 'code' => $ot_class, 'sort_order' => $j); //$current_ot_totals_array[] = $order_totals[$i]['code']; //$current_ot_titles_array[] = $order_totals[$i]['title']; $written_ot_totals_array[] = $ot_class; $written_ot_titles_array[] = $ot_title; $j++; } //end 7 } //end 2 } else {//within 1 // $_POST['update_totals'] is not an array => write in all order total components that have been generated by the sundry modules for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { //8 $new_order_totals[] = array('title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'code' => $order_totals[$i]['code'], 'sort_order' => $j); $j++; } //end 8 } //end if (is_array($_POST['update_totals'])) { //1 /* array(6) { [0]=> array(5) { ["title"]=> string(14) "Sous-Total HT:" ["text"]=> string(9) "990.00EUR" ["value"]=> float(990) ["code"]=> string(17) "ot_subtotal_wotax" ["sort_order"]=> int(1) } [1]=> array(5) { ["title"]=> string(18) "Code avoir Z3LC3D:" ["text"]=> string(9) "-13.16EUR" ["value"]=> string(6) "-13.16" ["code"]=> string(18) "ot_discount_coupon" ["sort_order"]=> int(2) } [2]=> array(5) { ["title"]=> string(69) "Retrait en magasin (Showroom vente en gros LP Divertissements" ["text"]=> string(7) "0.00EUR" ["value"]=> string(4) "0.00" ["code"]=> string(11) "ot_shipping" ["sort_order"]=> int(3) } [3]=> array(5) { ["title"]=> string(9) "Total HT:" ["text"]=> string(9) "990.00EUR" ["value"]=> float(990) ["code"]=> string(14) "ot_total_wotax" ["sort_order"]=> int(4) } [4]=> array(5) { ["title"]=> string(8) "TVA 20%:" ["text"]=> string(9) "198.00EUR" ["value"]=> float(198) ["code"]=> string(6) "ot_tax" ["sort_order"]=> int(5) } [5]=> array(5) { ["title"]=> string(6) "Total:" ["text"]=> string(18) "1,188.00EUR" ["value"]=> float(1188) ["code"]=> string(8) "ot_total" ["sort_order"]=> int(6) } }*/ // quand il y a un avoir, recalcul sur les totaux if ($new_order_totals[1]['code'] == 'ot_discount_coupon') { //total HT if ( ((float)$new_order_totals[0]['value']+(float)$new_order_totals[1]['value']) >= 0 ) { (float)$new_order_totals[3]['value'] = (float)$new_order_totals[0]['value']+(float)$new_order_totals[1]['value']+(float)$new_order_totals[2]['value']; } else { (float)$new_order_totals[3]['value'] = (float)$new_order_totals[2]['value']; } $new_order_totals[3]['value'] = round($new_order_totals[3]['value'], 2, PHP_ROUND_HALF_UP); $new_order_totals[3]['text'] = $new_order_totals[3]['value'].'EUR'; //total TTC (float)$new_order_totals[5]['value'] = (float)$new_order_totals[3]['value']*1.2; $new_order_totals[5]['value'] = round($new_order_totals[5]['value'], 2, PHP_ROUND_HALF_UP); $new_order_totals[5]['text'] = $new_order_totals[5]['value'].'EUR'; //TVA (float)$new_order_totals[4]['value'] = (float)$new_order_totals[5]['value']-(float)$new_order_totals[3]['value']; $new_order_totals[4]['value'] = round($new_order_totals[4]['value'], 2, PHP_ROUND_HALF_UP); $new_order_totals[4]['text'] = $new_order_totals[4]['value'].'EUR'; } for ($i=0, $n=sizeof($new_order_totals); $i<$n; $i++) { $sql_data_array = array('orders_id' => $oID, // -> VD : suppression des '/' dans les titres des totaux 'title' => stripslashes(oe_iconv($new_order_totals[$i]['title'])), 'text' => stripslashes($new_order_totals[$i]['text']), // <- VD 'value' => $new_order_totals[$i]['value'], 'class' => $new_order_totals[$i]['code'], 'sort_order' => $new_order_totals[$i]['sort_order']); tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array); } if (isset($_POST['subaction'])) { switch($_POST['subaction']) { case 'add_product': tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit#products')); break; } } /*if ( $_GET['oID'] == 75706 ) { die(var_dump($new_order_totals)); }*/ // 1.5 SUCCESS MESSAGE ##### // CHECK FOR NEW EMAIL CONFIRMATION if ( (isset($_POST['nC1'])) || (isset($_POST['nC2'])) || (isset($_POST['nC3'])) ) { //then the user selected the option of sending a new email tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=email')); //redirect to the email case } else { //email? email? We don't need no stinkin email! if ($order_updated) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit')); } break; // 3. NEW ORDER EMAIL ############################################################################################### case 'email': $oID = tep_db_prepare_input($_GET['oID']); $order = new manualOrder($oID); for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { //loop all the products in the order $products_ordered_attributes = ''; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { $products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value']; } } $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . $products_model . ' = ' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . $products_ordered_attributes . "\n"; } //Build the email $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_MODIFIED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) { $email_order .= strip_tags($order->totals[$i]['title']) . ' ' . strip_tags($order->totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . $order->delivery['name'] . "\n"; if ($order->delivery['company']) { $email_order .= $order->delivery['company'] . "\n"; } $email_order .= $order->delivery['street_address'] . "\n"; if ($order->delivery['suburb']) { $email_order .= $order->delivery['suburb'] . "\n"; } $email_order .= $order->customer['city'] . "\n"; if ($order->delivery['state']) { $email_order .= $order->delivery['state'] . "\n"; } $email_order .= $order->customer['postcode'] . "\n" . $order->delivery['country'] . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . $order->billing['name'] . "\n"; if ($order->billing['company']) { $email_order .= $order->billing['company'] . "\n"; } $email_order .= $order->billing['street_address'] . "\n"; if ($order->billing['suburb']) { $email_order .= $order->billing['suburb'] . "\n"; } $email_order .= $order->customer['city'] . "\n"; if ($order->billing['state']) { $email_order .= $order->billing['state'] . "\n"; } $email_order .= $order->customer['postcode'] . "\n" . $order->billing['country'] . "\n\n"; $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $email_order .= $order->info['payment_method'] . "\n\n"; // if ( ($order->info['payment_method'] == ORDER_EDITOR_SEND_INFO_PAYMENT_METHOD) && (EMAIL_TEXT_PAYMENT_INFO) ) { // $email_order .= EMAIL_TEXT_PAYMENT_INFO . "\n\n"; // } //I'm not entirely sure what the purpose of this is so it is being shelved for now if (EMAIL_TEXT_FOOTER) { $email_order .= EMAIL_TEXT_FOOTER . "\n\n"; } //code for plain text emails which changes the € sign to EUR, otherwise the email will show ? instead of € $email_order = str_replace("€","EUR",$email_order); $email_order = str_replace(" "," ",$email_order); //code which replaces the
tags within EMAIL_TEXT_PAYMENT_INFO and EMAIL_TEXT_FOOTER with the proper \n $email_order = str_replace("
","\n",$email_order); //send the email to the customer tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people as necessary if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } //do the dirty $messageStack->add_session(SUCCESS_EMAIL_SENT, 'success'); tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit')); break; //// // Edit Order case 'edit': if (!isset($_GET['oID'])) { $messageStack->add(ERROR_NO_ORDER_SELECTED, 'error'); break; } $oID = tep_db_prepare_input($_GET['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $order_exists = true; if (!tep_db_num_rows($orders_query)) { $order_exists = false; $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error'); break; } $order = new manualOrder($oID); $shippingKey = $order->adjust_totals($oID); $order->adjust_zones(); $cart = new manualCart(); $cart->restore_contents($oID); $total_count = $cart->count_contents(); $total_weight = $cart->show_weight(); // Get the shipping quotes $shipping_modules = new shipping; $shipping_quotes = $shipping_modules->quote(); break; } } $account_query = tep_db_query("select is_partner,coeff_partner from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$order->customer['id'] . "'"); $account = tep_db_fetch_array($account_query); $coeff_partner = $account['coeff_partner']; $is_partner = $account['is_partner']; // currecies drop-down array $currency_query = tep_db_query("select distinct title, code from " . TABLE_CURRENCIES . " order by code ASC"); $currency_array = array(); while($currency = tep_db_fetch_array($currency_query)) { $currency_array[] = array('id' => $currency['code'], 'text' => $currency['code'] . ' - ' . $currency['title']); } // $order->customer['name'] = ($order->customer['name']); ?> > <?php echo TITLE; ?> 0000003: icirelais/exapaq ?> OSC-1 : Edition des produits livrés dans les commandes ?>
OSC-1 : Edition des produits livrés dans les commandes ?>
 
 
 


0000025: edition des commandes : l'adresse de livraison n'apparaît pas quand elle a des guillemets ?>
customer['name'], 'size="37" ' .$more);?>
customer['company'], 'size="37" ' .$more);?>
customer['street_address'], 'size="37" ' .$more);?>
customer['suburb'], 'size="37" ' .$more);?>
customer['delivery'], 'size="37" ' .$more);?>
onChange="updateOrdersField('customers_city', encodeURIComponent(this.value))">, customer['country_id']), $order->customer['zone_id'], 'style="width: 200px;" onChange="updateOrdersField(\'customers_state\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_customer_zone_id', tep_get_country_zones($order->customer['country_id']), $order->customer['zone_id'], 'style="width: 200px;"'); }?>onChange="updateOrdersField('customers_state', encodeURIComponent(this.value))">
onChange="updateOrdersField('customers_postcode', encodeURIComponent(this.value))"> customer['country_id'], 'style="width: 200px;" onChange="update_zone(\'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\'); updateOrdersField(\'customers_country\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_customer_country_id', tep_get_countries(), $order->customer['country_id'], 'style="width: 200px;" onChange="update_zone(\'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\');"'); } ?>
onChange="updateOrdersField('customers_telephone', encodeURIComponent(this.value))">
onChange="updateOrdersField('customers_email_address', encodeURIComponent(this.value))">
0000025: edition des commandes : l'adresse de livraison n'apparaît pas quand elle a des guillemets ?>
delivery['name'], 'size="37" ' .$more);?>
delivery['company'], 'size="37" ' .$more);?>
delivery['street_address'], 'size="37" ' .$more);?>
delivery['suburb'], 'size="37" ' .$more);?>
onChange="updateOrdersField('delivery_city', encodeURIComponent(this.value))">, delivery['country_id']), $order->delivery['zone_id'], 'style="width: 200px;" onChange="updateShippingZone(\'delivery_state\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_delivery_zone_id', tep_get_country_zones($order->delivery['country_id']), $order->delivery['zone_id'], 'style="width: 200px;"'); } ?> onChange="updateShippingZone('delivery_state', encodeURIComponent(this.value))">
onChange="updateShippingZone('delivery_postcode', encodeURIComponent(this.value))"> delivery['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_delivery_country_id\', \'update_delivery_zone_id\', \'deliveryStateInput\', \'deliveryStateMenu\'); updateShippingZone(\'delivery_country\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_delivery_country_id', tep_get_countries(), $order->delivery['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_delivery_country_id\', \'update_delivery_zone_id\', \'deliveryStateInput\', \'deliveryStateMenu\');"'); } ?>
 
0000025: edition des commandes : l'adresse de livraison n'apparaît pas quand elle a des guillemets ?>
billing['name'], 'size="37" ' .$more);?>
billing['company'], 'size="37" ' .$more);?>
billing['street_address'], 'size="37" ' .$more);?>
billing['suburb'], 'size="37" ' .$more);?>
onChange="updateOrdersField('billing_city', encodeURIComponent(this.value))">, billing['country_id']), $order->billing['zone_id'], 'style="width: 200px;" onChange="updateOrdersField(\'billing_state\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_billing_zone_id', tep_get_country_zones($order->billing['country_id']), $order->billing['zone_id'], 'style="width: 200px;"'); } ?> onChange="updateOrdersField('billing_state', encodeURIComponent(this.value))">
onChange="updateOrdersField('billing_postcode', encodeURIComponent(this.value))"> billing['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"'); } else { echo tep_draw_pull_down_menu('update_billing_country_id', tep_get_countries(), $order->billing['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"'); } ?>
read()) { if (!is_dir( $module_directory . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $directory_array[] = $file; } } } sort($directory_array); $dir->close(); } // For each available payment module, check if enabled for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) { $file = $directory_array[$i]; include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/payment/' . $file); include($module_directory . $file); $class = substr($file, 0, strrpos($file, '.')); if (tep_class_exists($class)) { $module = new $class; if ($module->check() > 0) { // If module enabled create array of titles $enabled_payment[] = array('id' => $module->title, 'text' => $module->title); //if the payment method is the same as the payment module title then don't add it to dropdown menu if ($module->title == $order->info['payment_method']) { $paymentMatchExists='true'; } } } } //just in case the payment method found in db is not the same as the payment module title then make it part of the dropdown array or else it cannot be the selected default value if ($paymentMatchExists !='true') { $enabled_payment[] = array('id' => $order->info['payment_method'], 'text' => $order->info['payment_method']); } $enabled_payment[] = array('id' => 'Autre', 'text' => 'Autre'); //draw the dropdown menu for payment methods and default to the order value if (ORDER_EDITOR_USE_AJAX == 'true') { // -> VDORED : agrandissement du champs de selection des moyens de paiement echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 175;" onChange="init(); updateOrdersField(\'payment_method\', this.options[this.selectedIndex].text)"'); // <- VDORED } else { // -> VDORED : agrandissement du champs de selection des moyens de paiement echo tep_draw_pull_down_menu('update_info_payment_method', $enabled_payment, $order->info['payment_method'], 'id="update_info_payment_method" style="width: 175;" onChange="init();"'); // <- VDORED } } else { //draw the input field for payment methods and default to the order value ?> currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } echo tep_draw_pull_down_menu('update_info_payment_currency', $currencies_array, $order->info['currency'], 'id="update_info_payment_currency" onChange="currency(this.value)"'); ?>
onChange="updateOrdersField('cc_type', encodeURIComponent(this.value))">
onChange="updateOrdersField('cc_owner', encodeURIComponent(this.value))">
onChange="updateOrdersField('cc_number', encodeURIComponent(this.value))">
onChange="updateOrdersField('cc_expires', encodeURIComponent(this.value))">
0000023: affichage des dernières commandes ?>
Commandes précédentes
customer['id'] . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and o.orders_id <> '" . (int)$oID . "' order by orders_id desc limit " . LAST_ORDERS_COUNT); while ($orders = tep_db_fetch_array($orders_query)) { ?>
VDSTCMD : affichage du stock courant dans les commandes admin ?> OSC-1 : Edition des produits livrés dans les commandes ?> products)) { // -> VDSTCMD : affichage du stock courant dans les commandes admin $order->update_stock(); // <- VDSTCMD for ($i=0; $iproducts); $i++) { $orders_products_id = $order->products[$i]['orders_products_id']; ?> VDSTCMD : affichage du stock courant dans les commandes admin ?> OSC-1 : Edition des produits livrés dans les commandes ?> OSC-1 : Edition des produits livrés dans les commandes ?>

Stock
" onClick="updateProductsField('delete', '', 'delete', this.checked, this)">
get_text_stock($order->products[$i]['products_id']);?>
" size="2" onKeyUp="updatePrices('qty', '')" onChange="updateProductsField('reload1', '', 'products_quantity', encodeURIComponent(this.value))" value="products[$i]['qty']; ?>" id="">
" size="2" onKeyUp="updatePrices('qty', '')" onChange="updateProductsField('reload1', '', 'qty_sent', encodeURIComponent(this.value))" value="products[$i]['qty_sent'] != "" ) { echo $order->products[$i]['qty_sent']; } else { echo $order->products[$i]['qty']; } ?>" id="">
" size="50" onChange="updateProductsField('update', '', 'products_name', encodeURIComponent(this.value))" value='products[$i]['name']); ?>' id=""> products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) { for ($j=0; $jproducts[$i]['attributes']); $j++) { $orders_products_attributes_id = $order->products[$i]['attributes'][$j]['orders_products_attributes_id']; if (ORDER_EDITOR_USE_AJAX == 'true') { echo '
  - ' . "" . ': ' . "" . ': ' . "" . ': ' . ""; } else { echo '
  - ' . "" . ': ' . "" . ': ' . "" . ': ' . ""; } echo ''; } //end for ($j=0; $jproducts[$i]['attributes']); $j++) { //Has downloads? if (DOWNLOAD_ENABLED == 'true') { $downloads_count = 1; $d_index = 0; $download_query_raw ="SELECT orders_products_download_id, orders_products_filename, download_maxdays, download_count FROM " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " WHERE orders_products_id='" . $orders_products_id . "' AND orders_id='" . (int)$oID . "' ORDER BY orders_products_download_id"; $download_query = tep_db_query($download_query_raw); // if (isset($downloads->products)) unset($downloads->products); // if (tep_db_num_rows($download_query) > 0) { while ($download = tep_db_fetch_array($download_query)) { $downloads->products[$d_index] = array( 'id' => $download['orders_products_download_id'], 'filename' => $download['orders_products_filename'], 'maxdays' => $download['download_maxdays'], 'maxcount' => $download['download_count']); $d_index++; } } if (isset($downloads->products) && (sizeof($downloads->products) > 0)) { for ($mm=0; $mmproducts); $mm++) { $id = $downloads->products[$mm]['id']; echo '
'; echo '' . ENTRY_DOWNLOAD_COUNT . $downloads_count . ""; echo '
' . "\n"; if (ORDER_EDITOR_USE_AJAX == 'true') { echo ' - ' . ENTRY_DOWNLOAD_FILENAME . ": "; echo '
' . "\n"; echo ' - ' . ENTRY_DOWNLOAD_MAXDAYS . ": "; echo '
' . "\n"; echo ' - ' . ENTRY_DOWNLOAD_MAXCOUNT . ": "; } else { echo ' - ' . ENTRY_DOWNLOAD_FILENAME . ": "; echo '
' . "\n"; echo ' - ' . ENTRY_DOWNLOAD_MAXDAYS . ": "; echo '
' . "\n"; echo ' - ' . ENTRY_DOWNLOAD_MAXCOUNT . ": "; } echo ' ' . "\n"; echo '
'; $downloads_count++; } //end for ($mm=0; $mmproducts[$i]['attributes']) > 0) { ?>
" size="12" onChange="updateProductsField('update', '', 'products_model', encodeURIComponent(this.value))" value="products[$i]['model']; ?>"> " size="5" onKeyUp="updatePrices('tax', '')" onChange="updateProductsField('reload1', '', 'products_tax', encodeURIComponent(this.value))" value="products[$i]['tax']); ?>" id="">% " size="5" onKeyUp="updatePrices('price', '')" onChange="updateProductsField('reload2', '')" value="products[$i]['price'], 4, '.', ''); ?>" id=""> " size="5" onKeyUp="updatePrices('final_price', '')" onChange="updateProductsField('reload2', '')" value="products[$i]['final_price'], 4, '.', ''); ?>" id=""> " size="5" value="products[$i]['final_price'] * (($order->products[$i]['tax']/100) + 1)), 4, '.', ''); ?>" onKeyUp="updatePrices('price_incl', '')" onChange="updateProductsField('reload2', '')" id=""> " size="5" value="products[$i]['final_price'] * $order->products[$i]['qty'], 4, '.', ''); ?>" onKeyUp="updatePrices('total_excl', '')" onChange="updateProductsField('reload2', '')" id=""> " size="5" value="products[$i]['final_price'] * (($order->products[$i]['tax']/100) + 1))) * $order->products[$i]['qty'], 4, '.', ''); ?>" onKeyUp="updatePrices('total_incl', '')" onChange="updateProductsField('reload2', '')" id="">


totals); $i++) { $id = $order->totals[$i]['class']; if ($order->totals[$i]['class'] == 'ot_shipping') { if (tep_not_null($order->info['shipping_id'])) { $shipping_module_id = $order->info['shipping_id']; } else { //here we could create logic to attempt to determine the shipping module used if it's not in the database $shipping_module_id = ''; } } else { $shipping_module_id = ''; } //end if ($order->totals[$i]['class'] == 'ot_shipping') { $rowStyle = (($i % 2) ? 'dataTableRowOver' : 'dataTableRow'); // -> VD : autorise la modification des frais d'expédition et du sous-total TTC dans l'édition des commandes) if ((!strstr($order->totals[$i]['class'], 'ot_custom')) && ($order->totals[$i]['class'] != 'ot_shipping') && ($order->totals[$i]['class'] != 'ot_subtotal')) { // if ( ($order->totals[$i]['class'] == 'ot_total') || ($order->totals[$i]['class'] == 'ot_subtotal_wotax') || ($order->totals[$i]['class'] == 'ot_total_wotax') || ($order->totals[$i]['class'] == 'ot_tax') || ($order->totals[$i]['class'] == 'ot_loworderfee') ) { // <- VD echo ' ' . "\n"; if ($order->totals[$i]['class'] != 'ot_total') { echo ' ' . "\n"; } else { echo ' ' . "\n"; } echo ' ' . "\n"; if ($order->info['currency'] != DEFAULT_CURRENCY) echo ' ' . "\n"; echo ' ' . "\n" . ' ' . "\n"; } else { if ($i % 2) { echo ' ' . "\n" . ' ' . "\n"; } else { echo ' ' . "\n" . ' ' . "\n"; } if (ORDER_EDITOR_USE_AJAX == 'true') { echo ' ' . "\n" . ' ' . "\n"; } else { echo ' ' . "\n" . ' ' . "\n"; } if ($order->info['currency'] != DEFAULT_CURRENCY) echo ' ' . "\n"; echo ' ' . "\n"; } } ?>
  ' . $order->totals[$i]['text'] . '
' . $order->totals[$i]['text'] . '
0) { ?> VD : affichage des frais de transport en HT // $shipping_cost_value = tep_add_tax($shipping_quotes[$i]['methods'][$j]['cost'], $shipping_quotes[$i]['tax']); // TTC $shipping_cost_value = $shipping_quotes[$i]['methods'][$j]['cost']; // <- VD echo ' ' . ' ' . "\n" . ' ' . "\n" . ' '; } } ?>
' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . $shipping_quotes[$i]['module'] . ' (' . $shipping_quotes[$i]['methods'][$j]['title'] . '):' . $currencies->format($shipping_cost_value, true, $order->info['currency'], $order->info['currency_value']) . '


 
 
 

' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' \n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "\n"; } echo ' ' . "\n" . ' ' . "\n"; echo ' ' . "\n" . ' ' . "\n"; } else { echo tep_draw_textarea_field("update_comments[" . $orders_history['orders_status_history_id'] . "][comments]", "soft", "40", "5", "" . $formatted_comments . "") . '' . "\n" . // <- 0000003 ' ' . "\n"; } echo ' ' . "\n"; } } else { echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } ?>
       
' . tep_datetime_short($orders_history['date_added']) . ' '; } else { echo '
' . tep_datetime_short($orders_history['date_added']) . ' '; } if ($orders_history['customer_notified'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . " ' . $orders_status_array[$orders_history['orders_status_id']] . ' '; // -> 0000003: icirelais/exapaq $formatted_comments= html_entity_decode(tep_db_output($orders_history['comments'])); // $formatted_comments= display_htmllink_if_web_address(nl2br(tep_db_output($orders_history['comments']))); if (ORDER_EDITOR_USE_AJAX == 'true') { echo tep_draw_textarea_field("update_comments[" . $orders_history['orders_status_history_id'] . "][comments]", "soft", "40", "5", "" . $formatted_comments . "", "onChange=\"updateCommentsField('update', '" . $orders_history['orders_status_history_id'] . "', 'false', encodeURIComponent(this.value))\"") . '' . "\n" . '
' . TEXT_NO_ORDER_HISTORY . '

 
0000003: icirelais/exapaq ?> OSC-1 : Edition des produits livrés dans les commandes ?>
info['orders_status'], 'id="status"'); ?>
info['icipass']); ?>
 
 
 
 

'; } ?>