function add_invoice_ship_position($invoice, $order_summary) { global $db; if (!empty($order_summary['shipping_method']) && $order_summary['shipping_method'] != '') { $query = $db->query("SELECT * FROM `" . DB_PREFIX . "order_total` WHERE order_id = " . mySQLSafe($order_summary['order_id']) . " AND title LIKE '" . $order_summary['shipping_method'] . "_'"); $val = $query->row['value']; $total_ship = round(floatval($val) * 123 / 100, 2); //$total_ship = round($val,2); $invoice_position = new PozycjaFaktury(0.23, 1, $total_ship, $order_summary['shipping_method'], 'usl.', 'PRC'); $invoice->dodajPozycjeFaktury($invoice_position); } }
function get_order_details($cart_order_id) { $sql = tep_db_query("SELECT * FROM orders_products WHERE orders_id=" . mySQLSafe($cart_order_id)); while ($row = tep_db_fetch_array($sql)) { $order_details[] = $row; } return $order_details; //return $sql; }
function get_customer_invoice_address($id) { $sql = "SELECT * FROM " . _DB_PREFIX_ . "address WHERE id_address=" . mySQLSafe($id); $res = DB::getInstance()->ExecuteS($sql); return $res[0]; }