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(); ?> -
- -
-
-

📦 جزئیات سفارش

- -
- - - + + +
+
+
+

📦 جزئیات سفارش

+
- - -
- - ← بازگشت به سفارشات - - - - - 💳 پرداخت - - - - - - - - -
- - -
-
-

🔎 وضعیت بررسی سفارش

- - - - -
- - -
-

⚠️ نیاز به اصلاح اطلاعات سفارش

- - -

- دلیل: - -

- - - -

- توضیحات: - -

- - - - - ✏️ اصلاح و ارسال مجدد سفارش - - -
- - - -
- تاریخچه بررسی سفارش - -
- -
-
- - Revision - - - - - -
- - -

- - - -

- - - - - -
- -
-
- -
- - - -
-

🗺️ مسیر ارسال

-
-
-
از
-
- -
-
- -
-
-
-
✈️
-
-
-
به
-
- -
-
- -
-
-
-
- - -
-

📦 اطلاعات مرسوله

-
-
- نوع سرویس - -
-
- جهت ارسال - - - -
-
- وزن واقعی - kg -
-
- وزن قابل محاسبه - kg -
-
- تاریخ ثبت - -
-
-
- - -
-

📦 بسته‌های مرسوله

- -
- -
-
- بسته - - - -
- -
-
- وزن - - kg - -
- -
- وزن حجمی - - kg - -
- -
- وزن قابل محاسبه - - kg - -
- -
- ابعاد - - - -
-
-
- -
-
- - - -
-

💰 اطلاعات مالی

-
-
- مبلغ خالص (درهم): - AED -
-
- مبلغ خالص (ریال): - ریال -
-
- مبلغ کل: - ریال -
-
- وضعیت پرداخت: - - - -
-
-
- - - -
-

👤 اطلاعات فرستنده

-
-
- نام - -
-
- تلفن - -
-
- آدرس - -
-
-
- - - - -
-

📮 اطلاعات گیرنده

-
-
- نام - -
-
- تلفن - -
-
- آدرس - -
-
-
- - - - - - -
-

📝 تعهدنامه‌ها

-
-

در حال بارگذاری...

-
-
- - - -
-

📍 تاریخچه رهگیری

-
- -
-
-
-
- - - - -
- -
- 📍 -
- -
-
- -
-
- -
-

📍 تاریخچه رهگیری

-

هنوز رویدادی ثبت نشده است.

-
- +
- - در حال آپلود...'); + $.ajax({ + url: ifnex_ajax.ajax_url, method: 'POST', data: fd, processData: false, contentType: false, + success: function(r) { if (r.success) { alert('آپلود شد.'); location.reload(); } else { alert('خطا: ' + (r.data||'')); btn.html(orig); } }, + error: function() { alert('خطا در ارتباط با سرور.'); btn.html(orig); } + }); +} + +