if (!$r->is_empty("s_ex")) { if (strlen($where)) { $where .= " AND "; } $s_ex = $r->get_value("s_ex"); $where .= $s_ex == 1 ? " o.is_exported=1 " : " (o.is_exported<>1 OR o.is_exported IS NULL) "; } if (!$r->is_empty("s_sti")) { if (strlen($where)) { $where .= " AND "; } $s_sti = $r->get_value("s_sti"); $where .= " o.site_id=" . $db->tosql($r->get_value("s_sti"), INTEGER); } } $r->set_form_parameters(); $where_sql = ""; if (strlen($where)) { $where_sql = " WHERE " . $where; } set_options($order_statuses, "status_id", "status_id"); // set up variables for navigator if ($product_search) { $total_records = 0; $total = 0; //Customization by Vital $sql = " SELECT o.order_total FROM ((((" . $table_prefix . "orders o "; //Customization by Vital $sql .= " INNER JOIN " . $table_prefix . "orders_items oi ON o.order_id=oi.order_id)"; $sql .= " LEFT JOIN " . $table_prefix . "orders_items_serials ois ON o.order_id=ois.order_id)"; $sql .= " LEFT JOIN " . $table_prefix . "orders_serials_activations osa ON o.order_id=osa.order_id)";