8dc06849f74bb05c093673abc23fbe22df7922d5.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="aiz-titlebar mt-2 mb-4">
  3. <div class="row align-items-center">
  4. <div class="col-md-6">
  5. <h1 class="h3"><?php echo e(translate('Order id')); ?>: <?php echo e($order->code); ?></h1>
  6. </div>
  7. </div>
  8. </div>
  9. <div class="card">
  10. <div class="card-header">
  11. <h5 class="h6 mb-0"><?php echo e(translate('Order Summary')); ?></h5>
  12. </div>
  13. <div class="card-body">
  14. <div class="row">
  15. <div class="col-lg-6">
  16. <table class="table-borderless table">
  17. <tr>
  18. <td class="w-50 fw-600"><?php echo e(translate('Order Code')); ?>:</td>
  19. <td><?php echo e($order->code); ?></td>
  20. </tr>
  21. <!--<tr>-->
  22. <!-- <td class="w-50 fw-600"><?php echo e(translate('Customer')); ?>:</td>-->
  23. <!-- <td><?php echo e(json_decode($order->shipping_address)->name); ?></td>-->
  24. <!--</tr>-->
  25. <tr>
  26. <td class="w-50 fw-600"><?php echo e(translate('Email')); ?>:</td>
  27. <?php if($order->user_id != null): ?>
  28. <td><?php echo e($order->user->email); ?></td>
  29. <?php endif; ?>
  30. </tr>
  31. <tr>
  32. <td class="w-50 fw-600"><?php echo e(translate('Shipping address')); ?>:</td>
  33. <td><?php echo e(json_decode($order->shipping_address)->address); ?>,
  34. <?php echo e(json_decode($order->shipping_address)->city); ?>,
  35. <?php echo e(json_decode($order->shipping_address)->postal_code); ?>,
  36. <?php echo e(json_decode($order->shipping_address)->country); ?></td>
  37. </tr>
  38. </table>
  39. </div>
  40. <div class="col-lg-6">
  41. <table class="table-borderless table">
  42. <tr>
  43. <td class="w-50 fw-600"><?php echo e(translate('Order date')); ?>:</td>
  44. <td><?php echo e(date('d-m-Y H:i A', $order->date)); ?></td>
  45. </tr>
  46. <tr>
  47. <td class="w-50 fw-600"><?php echo e(translate('Order status')); ?>:</td>
  48. <td><?php echo e(translate(ucfirst(str_replace('_', ' ', $order->delivery_status)))); ?></td>
  49. </tr>
  50. <tr>
  51. <td class="w-50 fw-600"><?php echo e(translate('Total order amount')); ?>:</td>
  52. <td><?php echo e(single_price($order->orderDetails->sum('price') + $order->orderDetails->sum('tax'))); ?>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="w-50 fw-600"><?php echo e(translate('Shipping method')); ?>:</td>
  57. <td><?php echo e(translate('Flat shipping rate')); ?></td>
  58. </tr>
  59. <tr>
  60. <td class="w-50 fw-600"><?php echo e(translate('Payment method')); ?>:</td>
  61. <td><?php echo e(translate(ucfirst(str_replace('_', ' ', $order->payment_type)))); ?></td>
  62. </tr>
  63. <tr>
  64. <td class="text-main text-bold"><?php echo e(translate('Additional Info')); ?></td>
  65. <td class=""><?php echo e($order->additional_info); ?></td>
  66. </tr>
  67. <?php if($order->tracking_code): ?>
  68. <tr>
  69. <td class="w-50 fw-600"><?php echo e(translate('Tracking code')); ?>:</td>
  70. <td><?php echo e($order->tracking_code); ?></td>
  71. </tr>
  72. <?php endif; ?>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="row">
  79. <div class="col-md-9">
  80. <div class="card">
  81. <div class="card-header">
  82. <h5 class="h6 mb-0"><?php echo e(translate('Order Details')); ?></h5>
  83. </div>
  84. <div class="card-body">
  85. <table class="aiz-table table">
  86. <thead>
  87. <tr>
  88. <th>#</th>
  89. <th width="30%"><?php echo e(translate('Product')); ?></th>
  90. <th data-breakpoints="md"><?php echo e(translate('Variation')); ?></th>
  91. <th><?php echo e(translate('Quantity')); ?></th>
  92. <th data-breakpoints="md"><?php echo e(translate('Delivery Type')); ?></th>
  93. <th><?php echo e(translate('Price')); ?></th>
  94. <?php if(addon_is_activated('refund_request')): ?>
  95. <th data-breakpoints="md"><?php echo e(translate('Refund')); ?></th>
  96. <?php endif; ?>
  97. <th data-breakpoints="md" class="text-right"><?php echo e(translate('Review')); ?></th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <?php $__currentLoopData = $order->orderDetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $orderDetail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  102. <tr>
  103. <td><?php echo e($key + 1); ?></td>
  104. <td>
  105. <?php if($orderDetail->product != null && $orderDetail->product->auction_product == 0): ?>
  106. <a href="<?php echo e(route('product', $orderDetail->product->slug)); ?>"
  107. target="_blank"><?php echo e($orderDetail->product->getTranslation('name')); ?></a>
  108. <?php elseif($orderDetail->product != null && $orderDetail->product->auction_product == 1): ?>
  109. <a href="<?php echo e(route('auction-product', $orderDetail->product->slug)); ?>"
  110. target="_blank"><?php echo e($orderDetail->product->getTranslation('name')); ?></a>
  111. <?php else: ?>
  112. <strong><?php echo e(translate('Product Unavailable')); ?></strong>
  113. <?php endif; ?>
  114. </td>
  115. <td>
  116. <?php echo e($orderDetail->variation); ?>
  117. </td>
  118. <td>
  119. <?php echo e($orderDetail->quantity); ?>
  120. </td>
  121. <td>
  122. <?php if($order->shipping_type != null && $order->shipping_type == 'home_delivery'): ?>
  123. <?php echo e(translate('Home Delivery')); ?>
  124. <?php elseif($order->shipping_type == 'pickup_point'): ?>
  125. <?php if($order->pickup_point != null): ?>
  126. <?php echo e($order->pickup_point->name); ?> (<?php echo e(translate('Pickip Point')); ?>)
  127. <?php endif; ?>
  128. <?php endif; ?>
  129. </td>
  130. <td><?php echo e(single_price($orderDetail->price)); ?></td>
  131. <?php if(addon_is_activated('refund_request')): ?>
  132. <?php
  133. $no_of_max_day = get_setting('refund_request_time');
  134. $last_refund_date = $orderDetail->created_at->addDays($no_of_max_day);
  135. $today_date = Carbon\Carbon::now();
  136. ?>
  137. <td>
  138. <?php if($orderDetail->product != null && $orderDetail->product->refundable != 0 && $orderDetail->refund_request == null && $today_date <= $last_refund_date && $orderDetail->payment_status == 'paid' && $orderDetail->delivery_status == 'delivered'): ?>
  139. <a href="<?php echo e(route('refund_request_send_page', $orderDetail->id)); ?>"
  140. class="btn btn-primary btn-sm"><?php echo e(translate('Send')); ?></a>
  141. <?php elseif($orderDetail->refund_request != null && $orderDetail->refund_request->refund_status == 0): ?>
  142. <b class="text-info"><?php echo e(translate('Pending')); ?></b>
  143. <?php elseif($orderDetail->refund_request != null && $orderDetail->refund_request->refund_status == 2): ?>
  144. <b class="text-success"><?php echo e(translate('Rejected')); ?></b>
  145. <?php elseif($orderDetail->refund_request != null && $orderDetail->refund_request->refund_status == 1): ?>
  146. <b class="text-success"><?php echo e(translate('Approved')); ?></b>
  147. <?php elseif($orderDetail->product->refundable != 0): ?>
  148. <b><?php echo e(translate('N/A')); ?></b>
  149. <?php else: ?>
  150. <b><?php echo e(translate('Non-refundable')); ?></b>
  151. <?php endif; ?>
  152. </td>
  153. <?php endif; ?>
  154. <td class="text-right">
  155. <?php if($orderDetail->delivery_status == 'delivered' || true): ?>
  156. <a href="javascript:void(0);"
  157. onclick="product_review('<?php echo e($orderDetail->product_id); ?>')"
  158. class="btn btn-primary btn-sm"> <?php echo e(translate('Review')); ?> </a>
  159. <?php else: ?>
  160. <span class="text-danger"><?php echo e(translate('Not Delivered Yet')); ?></span>
  161. <?php endif; ?>
  162. </td>
  163. </tr>
  164. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  165. </tbody>
  166. </table>
  167. </div>
  168. </div>
  169. </div>
  170. <div class="col-md-3">
  171. <div class="card">
  172. <div class="card-header">
  173. <b class="fs-15"><?php echo e(translate('Order Ammount')); ?></b>
  174. </div>
  175. <div class="card-body pb-0">
  176. <table class="table-borderless table">
  177. <tbody>
  178. <tr>
  179. <td class="w-50 fw-600"><?php echo e(translate('Subtotal')); ?></td>
  180. <td class="text-right">
  181. <span
  182. class="strong-600"><?php echo e(single_price($order->orderDetails->sum('price'))); ?></span>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td class="w-50 fw-600"><?php echo e(translate('Shipping')); ?></td>
  187. <td class="text-right">
  188. <span
  189. class="text-italic"><?php echo e(single_price($order->orderDetails->sum('shipping_cost'))); ?></span>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td class="w-50 fw-600"><?php echo e(translate('Tax')); ?></td>
  194. <td class="text-right">
  195. <span
  196. class="text-italic"><?php echo e(single_price($order->orderDetails->sum('tax'))); ?></span>
  197. </td>
  198. </tr>
  199. <tr>
  200. <td class="w-50 fw-600"><?php echo e(translate('Coupon')); ?></td>
  201. <td class="text-right">
  202. <span class="text-italic"><?php echo e(single_price($order->coupon_discount)); ?></span>
  203. </td>
  204. </tr>
  205. <tr>
  206. <td class="w-50 fw-600"><?php echo e(translate('Total')); ?></td>
  207. <td class="text-right">
  208. <strong><span><?php echo e(single_price($order->grand_total)); ?></span></strong>
  209. </td>
  210. </tr>
  211. </tbody>
  212. </table>
  213. </div>
  214. </div>
  215. <?php if($order->manual_payment && $order->manual_payment_data == null): ?>
  216. <button onclick="show_make_payment_modal(<?php echo e($order->id); ?>)"
  217. class="btn btn-block btn-primary"><?php echo e(translate('Make Payment')); ?></button>
  218. <?php endif; ?>
  219. </div>
  220. <?php if( $express->express_info ): ?>
  221. <?php date_default_timezone_set("PRC");?>
  222. <style>
  223. .table2 {
  224. background-color:#FFF;
  225. border-collapse: collapse;
  226. margin:20px 0px;
  227. }
  228. .table2 {
  229. border: 2px solid #FFF;
  230. }
  231. </style>
  232. <table class="table table2">
  233. <tr>
  234. <td colspan="2" style="text-align:center; background-color:#e62e04;color:#FFF;;"><b><?php echo e(translate('Express information')); ?></b> </td>
  235. </tr>
  236. <tr>
  237. <td style="width:100px;"> <?php echo e(translate('courier company')); ?>:</td>
  238. <td> <?php echo e($express->express_name); ?> </td>
  239. </tr>
  240. <tr>
  241. <td> <?php echo e(translate('shipment number')); ?>:</td>
  242. <td> <?php echo e($express->express_code); ?> </td>
  243. </tr>
  244. <tr>
  245. <td colspan="2" style="text-align:center;background-color:#e62e04;color:#FFF;"><b><?php echo e(translate('Logistics tracking information')); ?></b></td>
  246. </tr>
  247. <?php if( $express->express_info ): ?>
  248. <?php $__currentLoopData = $express->express_info; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $ex): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  249. <?php
  250. if( strtotime( $express->express_time[$key] ) < time() ){ ?>
  251. <tr><td colspan="2"> <?php echo e($express->express_stime[$key]); ?> <?php echo e($ex); ?> </td></tr>
  252. <?php } ?>
  253. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  254. <?php endif; ?>
  255. </table>
  256. <?php endif; ?>
  257. </div>
  258. <?php $__env->stopSection(); ?>
  259. <?php $__env->startSection('modal'); ?>
  260. <!-- Product Review Modal -->
  261. <div class="modal fade" id="product-review-modal">
  262. <div class="modal-dialog">
  263. <div class="modal-content" id="product-review-modal-content">
  264. </div>
  265. </div>
  266. </div>
  267. <div class="modal fade" id="payment_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
  268. aria-hidden="true">
  269. <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
  270. <div class="modal-content">
  271. <div id="payment_modal_body">
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <?php $__env->stopSection(); ?>
  277. <?php $__env->startSection('script'); ?>
  278. <script type="text/javascript">
  279. function show_make_payment_modal(order_id) {
  280. $.post('<?php echo e(route('checkout.make_payment')); ?>', {
  281. _token: '<?php echo e(csrf_token()); ?>',
  282. order_id: order_id
  283. }, function(data) {
  284. $('#payment_modal_body').html(data);
  285. $('#payment_modal').modal('show');
  286. $('input[name=order_id]').val(order_id);
  287. });
  288. }
  289. function product_review(product_id) {
  290. $.post('<?php echo e(route('product_review_modal')); ?>', {
  291. _token: '<?php echo e(@csrf_token()); ?>',
  292. product_id: product_id
  293. }, function(data) {
  294. $('#product-review-modal-content').html(data);
  295. $('#product-review-modal').modal('show', {
  296. backdrop: 'static'
  297. });
  298. AIZ.extra.inputRating();
  299. });
  300. }
  301. </script>
  302. <?php $__env->stopSection(); ?>
  303. <?php echo $__env->make('frontend.layouts.user_panel', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/user/order_details_customer.blade.php ENDPATH**/ ?>