$customercode = 'amazonacount'; $clcttype = '0'; $pod = 'false'; $untread = 'Returned'; $printcode = '01'; $volweight = 0; $remark = ''; //订单详情 $items = ''; $sql = "SELECT * FROM om_unshipped_order_detail WHERE omOrderId = {$orderid}"; //echo $sql,"\n"; $query = $dbConn->query($sql); $res = $dbConn->fetch_array_all($query); foreach ($res as $v) { $is_combine = check_combine($v['sku']); $itmetitle = get_order_details($tabname, $v['id']); //exit($itmetitle); if (!$is_combine) { //非组合料号 $enname = substr($itmetitle, 0, 128); $count = $v['amount']; $description = substr($itmetitle, 0, 60); $sku_info = get_goods($v['sku']); $unit = ''; $weight = isset($sku_info['goodsWeight']) ? round(floatval($sku_info['goodsWeight']) * $count, 3) : 0; $cnname = isset($sku_info['goodsName']) ? substr($sku_info['goodsName'], 0, 64) : ''; } else { $enname = substr($itmetitle, 0, 128); $count = $v['amount']; $weight = 0; $sku = isset($is_combine['sku']) ? $is_combine['sku'] : '';
<?php //na serwerze produkcyjnym usunac [/opencart] require_once realpath(getcwd() . '/../../../../config.php'); require_once DIR_SYSTEM . 'startup.php'; require_once "ifirma/BuilderClasses.php"; require_once "ifirma/ifirma_functions.php"; $cart_order_id = $_GET['cart_order_id']; $registry = new Registry(); $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE); $registry->set('session', new Session()); if ($registry->get('session')->data['token'] != $_GET['token']) { echo "Wystąpił problem. Zaloguj się ponownie."; } else { $order_summary = get_order_summary($cart_order_id); verify_order_exists($order_summary); $order_details = get_order_details($cart_order_id); $wysylka = false; if (isset($_GET['Wysylkowa']) && $_GET['Wysylkowa'] == '1') { $wysylka = true; } $order_summary = $order_summary; $order_data = get_order_data($cart_order_id); $customer = get_order_customer($order_data); if (can_process_request_for_invoice_generation($cart_order_id)) { $invoice = get_invoice($order_summary, $customer, $wysylka); add_invoice_note($invoice, $cart_order_id); add_invoice_positions($invoice, $order_details); add_invoice_ship_position($invoice, $order_summary); weryfikuj_fakture_pod_katem_zgodnosci_zaokraglen($invoice); handle_invoice_generation($cart_order_id, $invoice); } else {
$res = exec_query($sql); $add = ""; if (strtolower(substr($sql, 0, strpos($sql, ' '))) == 'select') { $add = get_sql_result($res); } dbDisconnect($lnk); $body = get_sql_form($sql) . $add; $finish = true; } if (isset($_GET['mode'])) { $finish = false; $mode = 1; if ($_GET['mode'] == 'orddetail') { $isauth = is_auth(); if ($isauth) { $body = get_order_details($_GET['id']); } else { $body = pageBody(1); } $finish = true; } if ($_GET['mode'] == 'allord') { $mode = 0; } if ($_GET['mode'] == 'sql') { $finish = true; $body = get_sql_form(); } if ($_GET['mode'] == 'social') { $finish = true; $body = get_social_users();