47639f49ec0001d131b0e39c211e19525d21524e.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <div class="container">
  2. <?php if( $carts && count($carts) > 0 ): ?>
  3. <div class="row">
  4. <div class="col-xxl-8 col-xl-10 mx-auto">
  5. <div class="shadow-sm bg-white p-3 p-lg-4 rounded text-left">
  6. <div class="mb-4">
  7. <div class="row gutters-5 d-none d-lg-flex border-bottom mb-3 pb-3">
  8. <div class="col-md-5 fw-600"><?php echo e(translate('Product')); ?></div>
  9. <div class="col fw-600"><?php echo e(translate('Price')); ?></div>
  10. <div class="col fw-600"><?php echo e(translate('Tax')); ?></div>
  11. <div class="col fw-600"><?php echo e(translate('Quantity')); ?></div>
  12. <div class="col fw-600"><?php echo e(translate('Total')); ?></div>
  13. <div class="col-auto fw-600"><?php echo e(translate('Remove')); ?></div>
  14. </div>
  15. <ul class="list-group list-group-flush">
  16. <?php
  17. $total = 0;
  18. ?>
  19. <?php $__currentLoopData = $carts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cartItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  20. <?php
  21. $product = \App\Models\Product::find($cartItem['product_id']);
  22. $product_stock = $product->stocks->where('variant', $cartItem['variation'])->first();
  23. $total = $total + ($cartItem['price'] + $cartItem['tax']) * $cartItem['quantity'];
  24. $product_name_with_choice = $product->getTranslation('name');
  25. if ($cartItem['variation'] != null) {
  26. $product_name_with_choice = $product->getTranslation('name').' - '.$cartItem['variation'];
  27. }
  28. ?>
  29. <li class="list-group-item px-0 px-lg-3">
  30. <div class="row gutters-5">
  31. <div class="col-lg-5 d-flex">
  32. <span class="mr-2 ml-0">
  33. <img
  34. src="<?php echo e(uploaded_asset($product->thumbnail_img)); ?>"
  35. class="img-fit size-60px rounded"
  36. alt="<?php echo e($product->getTranslation('name')); ?>"
  37. >
  38. </span>
  39. <span class="fs-14 opacity-60"><?php echo e($product_name_with_choice); ?></span>
  40. </div>
  41. <div class="col-lg col-4 order-1 order-lg-0 my-3 my-lg-0">
  42. <span class="opacity-60 fs-12 d-block d-lg-none"><?php echo e(translate('Price')); ?></span>
  43. <span class="fw-600 fs-16"><?php echo e(single_price($cartItem['price'])); ?></span>
  44. </div>
  45. <div class="col-lg col-4 order-2 order-lg-0 my-3 my-lg-0">
  46. <span class="opacity-60 fs-12 d-block d-lg-none"><?php echo e(translate('Tax')); ?></span>
  47. <span class="fw-600 fs-16"><?php echo e(single_price($cartItem['tax'])); ?></span>
  48. </div>
  49. <div class="col-lg col-6 order-4 order-lg-0">
  50. <?php if($cartItem['digital'] != 1): ?>
  51. <div class="row no-gutters align-items-center aiz-plus-minus mr-2 ml-0">
  52. <button class="btn col-auto btn-icon btn-sm btn-circle btn-light" type="button" data-type="minus" data-field="quantity[<?php echo e($cartItem['id']); ?>]">
  53. <i class="las la-minus"></i>
  54. </button>
  55. <input type="number" name="quantity[<?php echo e($cartItem['id']); ?>]" class="col border-0 text-center flex-grow-1 fs-16 input-number" placeholder="1" value="<?php echo e($cartItem['quantity']); ?>" min="<?php echo e($product->min_qty); ?>" max="<?php echo e($product_stock->qty); ?>" onchange="updateQuantity(<?php echo e($cartItem['id']); ?>, this)">
  56. <button class="btn col-auto btn-icon btn-sm btn-circle btn-light" type="button" data-type="plus" data-field="quantity[<?php echo e($cartItem['id']); ?>]">
  57. <i class="las la-plus"></i>
  58. </button>
  59. </div>
  60. <?php endif; ?>
  61. </div>
  62. <div class="col-lg col-4 order-3 order-lg-0 my-3 my-lg-0">
  63. <span class="opacity-60 fs-12 d-block d-lg-none"><?php echo e(translate('Total')); ?></span>
  64. <span class="fw-600 fs-16 text-primary"><?php echo e(single_price(($cartItem['price'] + $cartItem['tax']) * $cartItem['quantity'])); ?></span>
  65. </div>
  66. <div class="col-lg-auto col-6 order-5 order-lg-0 text-right">
  67. <a href="javascript:void(0)" onclick="removeFromCartView(event, <?php echo e($cartItem['id']); ?>)" class="btn btn-icon btn-sm btn-soft-primary btn-circle">
  68. <i class="las la-trash"></i>
  69. </a>
  70. </div>
  71. </div>
  72. </li>
  73. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  74. </ul>
  75. </div>
  76. <div class="px-3 py-2 mb-4 border-top d-flex justify-content-between">
  77. <span class="opacity-60 fs-15"><?php echo e(translate('Subtotal')); ?></span>
  78. <span class="fw-600 fs-17"><?php echo e(single_price($total)); ?></span>
  79. </div>
  80. <div class="row align-items-center">
  81. <div class="col-md-6 text-center text-md-left order-1 order-md-0">
  82. <a href="<?php echo e(route('home')); ?>" class="btn btn-link">
  83. <i class="las la-arrow-left"></i>
  84. <?php echo e(translate('Return to shop')); ?>
  85. </a>
  86. </div>
  87. <div class="col-md-6 text-center text-md-right">
  88. <?php if(Auth::check()): ?>
  89. <a href="<?php echo e(route('checkout.shipping_info')); ?>" class="btn btn-primary fw-600">
  90. <?php echo e(translate('Continue to Shipping')); ?>
  91. </a>
  92. <?php else: ?>
  93. <button class="btn btn-primary fw-600" onclick="showCheckoutModal()"><?php echo e(translate('Continue to Shipping')); ?></button>
  94. <?php endif; ?>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <?php else: ?>
  101. <div class="row">
  102. <div class="col-xl-8 mx-auto">
  103. <div class="shadow-sm bg-white p-4 rounded">
  104. <div class="text-center p-3">
  105. <i class="las la-frown la-3x opacity-60 mb-3"></i>
  106. <h3 class="h4 fw-700"><?php echo e(translate('Your Cart is empty')); ?></h3>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <?php endif; ?>
  112. </div>
  113. <script type="text/javascript">
  114. AIZ.extra.plusMinus();
  115. </script>
  116. <?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/partials/cart_details.blade.php ENDPATH**/ ?>