diff --git a/03_WordPress/wp-content/plugins/ifnex-bridge/includes/shortcodes.php b/03_WordPress/wp-content/plugins/ifnex-bridge/includes/shortcodes.php index a3b19b6..127d270 100644 --- a/03_WordPress/wp-content/plugins/ifnex-bridge/includes/shortcodes.php +++ b/03_WordPress/wp-content/plugins/ifnex-bridge/includes/shortcodes.php @@ -961,7 +961,6 @@ function ifnex_order_detail_shortcode($atts) { $atts = shortcode_atts(array('order_id' => ''), $atts); $order_id = $atts['order_id'] ?: ($_GET['order_id'] ?? 0); - // اگر از URL pretty استفاده شده (order-detail/14/) if (!$order_id && isset($_SERVER['REQUEST_URI'])) { if (preg_match('/order-detail\/(\d+)/', $_SERVER['REQUEST_URI'], $matches)) { $order_id = $matches[1]; @@ -972,7 +971,6 @@ function ifnex_order_detail_shortcode($atts) { return '
شناسه سفارش مشخص نشده است.
'; } - // Handle PDF download $download_type = sanitize_text_field($_GET['download'] ?? ''); if ($download_type && in_array($download_type, ['awb', 'invoice', 'label', 'import-invoice'])) { ifnex_handle_pdf_download($order_id, $download_type); @@ -990,434 +988,274 @@ function ifnex_order_detail_shortcode($atts) { $data = $order['data']; $status = $data['status']; + $awb = $data['awb_no']; + $oid = (int)$order_id; + $dl_base = home_url('/order-detail/?order_id=' . $oid . '&download='); + // مراحل پیشرفت + $status_val = $status['value'] ?? ''; + $stage_order = ['pending_approval'=>1,'approved'=>2,'processed'=>3,'picked_up'=>4,'in_transit'=>5,'out_for_delivery'=>6,'delivered'=>7]; + $current_stage = $stage_order[$status_val] ?? 0; + $stages = [ + 1 => 'ثبت', 2 => 'تأیید', 3 => 'پرداخت', 4 => 'جمعآوری', + 5 => 'ارسال', 6 => 'تحویل' + ]; + ob_start(); ?> -
-
- دلیل: - -
- - - -- توضیحات: - -
- - - - - ✏️ اصلاح و ارسال مجدد سفارش - - -در حال بارگذاری...
-هنوز رویدادی ثبت نشده است.
-