ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/var/www/html/tien-dien/code/admin/orders/ |
<?php global $DB, $INFO, $print, $v_lang, $CORE; // Check if required variables are defined if (!isset($order) || !isset($order_items) || !isset($order_statuses) || !isset($shipping_method)) { // Redirect to orders list if variables are not defined $print->refresh('?act=admin&code=orders'); exit(); } ?> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="?act=admin&code=home">Trang chá»§</a></li> <li class="breadcrumb-item"><a href="?act=admin&code=orders">ÄÆ¡n hà ng</a></li> <li class="breadcrumb-item active">Chi tiết đơn hà ng #<?php echo $order['id']; ?></li> </ol> <?php if (isset($_GET['msg']) && $_GET['msg'] == 'updated'): ?> <div class="alert alert-success"> Cáºp nháºt đơn hà ng thà nh công! </div> <?php endif; ?> <div class="row"> <div class="col-md-8"> <!-- Order Details --> <div class="card"> <div class="card-header"> <h3 class="card-title">Chi tiết đơn hà ng #<?php echo $order['id']; ?></h3> </div> <div class="card-body"> <div class="row"> <div class="col-md-6"> <h5>Thông tin khách hà ng</h5> <p><strong>Há» tên:</strong> <?php echo $order['fullname']; ?></p> <p><strong>Email:</strong> <?php echo $order['email']; ?></p> <p><strong>Äiện thoại:</strong> <?php echo $order['phone']; ?></p> <p><strong>Äịa chỉ:</strong> <?php echo $order['address']; ?></p> <p><strong>Thà nh phố:</strong> <?php echo $order['city']; ?></p> </div> <div class="col-md-6"> <h5>Thông tin đơn hà ng</h5> <p><strong>Mã đơn hà ng:</strong> #<?php echo $order['id']; ?></p> <p><strong>Ngà y đặt:</strong> <?php echo date('d/m/Y H:i', strtotime($order['order_date'])); ?></p> <p><strong>Phương thức thanh toán:</strong> <?php if ($order['payment_method'] == 'cod') { echo 'Thanh toán khi nháºn hà ng'; } elseif ($order['payment_method'] == 'bank') { echo 'Chuyển khoản ngân hà ng'; } else { echo $order['payment_method']; } ?> </p> <p><strong>Phương thức váºn chuyển:</strong> <?php echo $shipping_method; ?></p> <p><strong>Phà váºn chuyển:</strong> <?php echo number_format($order['shipping_cost']); ?> VNÄ</p> <p><strong>Trạng thái:</strong> <?php $status_class = ''; switch($order['status']) { case 0: $status_class = 'badge-warning'; break; // Äang xá» lý case 1: $status_class = 'badge-info'; break; // Äã xác nháºn case 2: $status_class = 'badge-primary'; break; // Äang giao hà ng case 3: $status_class = 'badge-success'; break; // Äã giao hà ng case 4: $status_class = 'badge-danger'; break; // Äã há»§y } ?> <span class="badge <?php echo $status_class; ?>"> <?php echo $order_statuses[$order['status']]; ?> </span> </p> </div> </div> <hr> <h5>Ghi chú cá»§a khách hà ng</h5> <p><?php echo !empty($order['notes']) ? nl2br($order['notes']) : 'Không có ghi chú'; ?></p> <hr> <h5>Sản phẩm đã đặt</h5> <div class="table-responsive"> <table class="table table-bordered"> <thead> <tr> <th style="width: 100px">Hình ảnh</th> <th>Sản phẩm</th> <th style="width: 100px">Giá</th> <th style="width: 80px">Số lượng</th> <th style="width: 120px">Thà nh tiá»n</th> </tr> </thead> <tbody> <?php $subtotal = 0; foreach ($order_items as $item): $item_total = $item['price'] * $item['quantity']; $subtotal += $item_total; ?> <tr> <td> <?php if (!empty($item['path_img'])): ?> <img src="<?php echo $item['path_img']; ?>" alt="<?php echo $item['title']; ?>" style="max-width: 80px; max-height: 80px;"> <?php else: ?> <img src="upload/products/no-image.jpg" alt="No Image" style="max-width: 80px; max-height: 80px;"> <?php endif; ?> </td> <td> <a href="?act=admin&code=product&type=product&id=<?php echo $item['product_id']; ?>" target="_blank"> <?php echo $item['title']; ?> </a> </td> <td><?php echo number_format($item['price']); ?> VNÄ</td> <td><?php echo $item['quantity']; ?></td> <td><?php echo number_format($item_total); ?> VNÄ</td> </tr> <?php endforeach; ?> </tbody> <tfoot> <tr> <th colspan="4" class="text-right">Tạm tÃnh:</th> <th><?php echo number_format($subtotal); ?> VNÄ</th> </tr> <tr> <th colspan="4" class="text-right">Phà váºn chuyển:</th> <th><?php echo number_format($order['shipping_cost']); ?> VNÄ</th> </tr> <tr> <th colspan="4" class="text-right">Tổng cá»™ng:</th> <th><?php echo number_format($order['total']); ?> VNÄ</th> </tr> </tfoot> </table> </div> </div> </div> </div> <div class="col-md-4"> <!-- Order Actions --> <div class="card"> <div class="card-header"> <h3 class="card-title">Cáºp nháºt đơn hà ng</h3> </div> <div class="card-body"> <form method="post" action=""> <div class="form-group"> <label for="status">Trạng thái đơn hà ng</label> <select class="form-control" id="status" name="status"> <?php foreach ($order_statuses as $key => $value): ?> <option value="<?php echo $key; ?>" <?php echo ($order['status'] == $key) ? 'selected' : ''; ?>><?php echo $value; ?></option> <?php endforeach; ?> </select> </div> <div class="form-group"> <label for="notes_admin">Ghi chú cá»§a admin</label> <textarea class="form-control" id="notes_admin" name="notes_admin" rows="5"><?php echo isset($order['notes_admin']) ? $order['notes_admin'] : ''; ?></textarea> </div> <div class="form-group"> <button type="submit" name="update_order" class="btn btn-primary">Cáºp nháºt đơn hà ng</button> <a href="?act=admin&code=orders" class="btn btn-default">Quay lại</a> </div> </form> </div> </div> </div> </div> </div> </div> </div> </section>