eb39a73b8aec3d8a27125cd21b4d99916e058e7f.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?php $__env->startSection('content'); ?>
  2. <section class="pt-5 mb-4">
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-xl-8 mx-auto">
  6. <div class="row aiz-steps arrow-divider">
  7. <div class="col done">
  8. <div class="text-center text-success">
  9. <i class="la-3x mb-2 las la-shopping-cart"></i>
  10. <h3 class="fs-14 fw-600 d-none d-lg-block"><?php echo e(translate('1. My Cart')); ?></h3>
  11. </div>
  12. </div>
  13. <div class="col done">
  14. <div class="text-center text-success">
  15. <i class="la-3x mb-2 las la-map"></i>
  16. <h3 class="fs-14 fw-600 d-none d-lg-block"><?php echo e(translate('2. Shipping info')); ?></h3>
  17. </div>
  18. </div>
  19. <div class="col active">
  20. <div class="text-center text-primary">
  21. <i class="la-3x mb-2 las la-truck"></i>
  22. <h3 class="fs-14 fw-600 d-none d-lg-block"><?php echo e(translate('3. Delivery info')); ?></h3>
  23. </div>
  24. </div>
  25. <div class="col">
  26. <div class="text-center">
  27. <i class="la-3x mb-2 opacity-50 las la-credit-card"></i>
  28. <h3 class="fs-14 fw-600 d-none d-lg-block opacity-50"><?php echo e(translate('4. Payment')); ?></h3>
  29. </div>
  30. </div>
  31. <div class="col">
  32. <div class="text-center">
  33. <i class="la-3x mb-2 opacity-50 las la-check-circle"></i>
  34. <h3 class="fs-14 fw-600 d-none d-lg-block opacity-50"><?php echo e(translate('5. Confirmation')); ?></h3>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </section>
  42. <section class="py-4 gry-bg">
  43. <div class="container">
  44. <div class="row">
  45. <div class="col-xxl-8 col-xl-10 mx-auto">
  46. <form class="form-default" action="<?php echo e(route('checkout.store_delivery_info')); ?>" role="form" method="POST">
  47. <?php echo csrf_field(); ?>
  48. <?php
  49. $admin_products = array();
  50. $seller_products = array();
  51. foreach ($carts as $key => $cartItem){
  52. $product = \App\Models\Product::find($cartItem['product_id']);
  53. if($product->added_by == 'admin'){
  54. array_push($admin_products, $cartItem['product_id']);
  55. }
  56. else{
  57. $product_ids = array();
  58. if(isset($seller_products[$product->user_id])){
  59. $product_ids = $seller_products[$product->user_id];
  60. }
  61. array_push($product_ids, $cartItem['product_id']);
  62. $seller_products[$product->user_id] = $product_ids;
  63. }
  64. }
  65. $pickup_point_list = array();
  66. if (get_setting('pickup_point') == 1) {
  67. $pickup_point_list = \App\Models\PickupPoint::where('pick_up_status',1)->get();
  68. }
  69. ?>
  70. <?php if(!empty($admin_products)): ?>
  71. <div class="card mb-3 shadow-sm border-0 rounded">
  72. <div class="card-header p-3">
  73. <h5 class="fs-16 fw-600 mb-0"><?php echo e(get_setting('site_name')); ?> <?php echo e(translate('Products')); ?></h5>
  74. </div>
  75. <div class="card-body">
  76. <ul class="list-group list-group-flush">
  77. <?php $__currentLoopData = $admin_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cartItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  78. <?php
  79. $product = \App\Models\Product::find($cartItem);
  80. ?>
  81. <li class="list-group-item">
  82. <div class="d-flex">
  83. <span class="mr-2">
  84. <img
  85. src="<?php echo e(uploaded_asset($product->thumbnail_img)); ?>"
  86. class="img-fit size-60px rounded"
  87. alt="<?php echo e($product->getTranslation('name')); ?>"
  88. >
  89. </span>
  90. <span class="fs-14 opacity-60"><?php echo e($product->getTranslation('name')); ?></span>
  91. </div>
  92. </li>
  93. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  94. </ul>
  95. <div class="row border-top pt-3">
  96. <div class="col-md-6">
  97. <h6 class="fs-15 fw-600"><?php echo e(translate('Choose Delivery Type')); ?></h6>
  98. </div>
  99. <div class="col-md-6">
  100. <div class="row gutters-5">
  101. <div class="col-6">
  102. <label class="aiz-megabox d-block bg-white mb-0">
  103. <input
  104. type="radio"
  105. name="shipping_type_<?php echo e(\App\Models\User::where('user_type', 'admin')->first()->id); ?>"
  106. value="home_delivery"
  107. onchange="show_pickup_point(this)"
  108. data-target=".pickup_point_id_admin"
  109. checked
  110. >
  111. <span class="d-flex p-3 aiz-megabox-elem">
  112. <span class="aiz-rounded-check flex-shrink-0 mt-1"></span>
  113. <span class="flex-grow-1 pl-3 fw-600"><?php echo e(translate('Home Delivery')); ?></span>
  114. </span>
  115. </label>
  116. </div>
  117. <?php if($pickup_point_list): ?>
  118. <div class="col-6">
  119. <label class="aiz-megabox d-block bg-white mb-0">
  120. <input
  121. type="radio"
  122. name="shipping_type_<?php echo e(\App\Models\User::where('user_type', 'admin')->first()->id); ?>"
  123. value="pickup_point"
  124. onchange="show_pickup_point(this)"
  125. data-target=".pickup_point_id_admin"
  126. >
  127. <span class="d-flex p-3 aiz-megabox-elem">
  128. <span class="aiz-rounded-check flex-shrink-0 mt-1"></span>
  129. <span class="flex-grow-1 pl-3 fw-600"><?php echo e(translate('Local Pickup')); ?></span>
  130. </span>
  131. </label>
  132. </div>
  133. <?php endif; ?>
  134. </div>
  135. <?php if($pickup_point_list): ?>
  136. <div class="mt-4 pickup_point_id_admin d-none">
  137. <select
  138. class="form-control aiz-selectpicker"
  139. name="pickup_point_id_<?php echo e(\App\Models\User::where('user_type', 'admin')->first()->id); ?>"
  140. data-live-search="true"
  141. >
  142. <option><?php echo e(translate('Select your nearest pickup point')); ?></option>
  143. <?php $__currentLoopData = $pickup_point_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $pick_up_point): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  144. <option
  145. value="<?php echo e($pick_up_point->id); ?>"
  146. data-content="<span class='d-block'>
  147. <span class='d-block fs-16 fw-600 mb-2'><?php echo e($pick_up_point->getTranslation('name')); ?></span>
  148. <span class='d-block opacity-50 fs-12'><i class='las la-map-marker'></i> <?php echo e($pick_up_point->getTranslation('address')); ?></span>
  149. <span class='d-block opacity-50 fs-12'><i class='las la-phone'></i><?php echo e($pick_up_point->phone); ?></span>
  150. </span>"
  151. >
  152. </option>
  153. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  154. </select>
  155. </div>
  156. <?php endif; ?>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <?php endif; ?>
  162. <?php if(!empty($seller_products)): ?>
  163. <?php $__currentLoopData = $seller_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $seller_product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  164. <div class="card mb-3 shadow-sm border-0 rounded">
  165. <div class="card-header p-3">
  166. <h5 class="fs-16 fw-600 mb-0"><?php echo e(\App\Models\Shop::where('user_id', $key)->first()->name); ?> <?php echo e(translate('Products')); ?></h5>
  167. </div>
  168. <div class="card-body">
  169. <ul class="list-group list-group-flush">
  170. <?php $__currentLoopData = $seller_product; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cartItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  171. <?php
  172. $product = \App\Models\Product::find($cartItem);
  173. ?>
  174. <li class="list-group-item">
  175. <div class="d-flex">
  176. <span class="mr-2">
  177. <img
  178. src="<?php echo e(uploaded_asset($product->thumbnail_img)); ?>"
  179. class="img-fit size-60px rounded"
  180. alt="<?php echo e($product->getTranslation('name')); ?>"
  181. >
  182. </span>
  183. <span class="fs-14 opacity-60"><?php echo e($product->getTranslation('name')); ?></span>
  184. </div>
  185. </li>
  186. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  187. </ul>
  188. <div class="row border-top pt-3">
  189. <div class="col-md-6">
  190. <h6 class="fs-15 fw-600"><?php echo e(translate('Choose Delivery Type')); ?></h6>
  191. </div>
  192. <div class="col-md-6">
  193. <div class="row gutters-5">
  194. <div class="col-6">
  195. <label class="aiz-megabox d-block bg-white mb-0">
  196. <input
  197. type="radio"
  198. name="shipping_type_<?php echo e($key); ?>"
  199. value="home_delivery"
  200. onchange="show_pickup_point(this)"
  201. data-target=".pickup_point_id_<?php echo e($key); ?>"
  202. checked
  203. >
  204. <span class="d-flex p-3 aiz-megabox-elem">
  205. <span class="aiz-rounded-check flex-shrink-0 mt-1"></span>
  206. <span class="flex-grow-1 pl-3 fw-600"><?php echo e(translate('Home Delivery')); ?></span>
  207. </span>
  208. </label>
  209. </div>
  210. <?php if($pickup_point_list): ?>
  211. <div class="col-6">
  212. <label class="aiz-megabox d-block bg-white mb-0">
  213. <input
  214. type="radio"
  215. name="shipping_type_<?php echo e($key); ?>"
  216. value="pickup_point"
  217. onchange="show_pickup_point(this)"
  218. data-target=".pickup_point_id_<?php echo e($key); ?>"
  219. >
  220. <span class="d-flex p-3 aiz-megabox-elem">
  221. <span class="aiz-rounded-check flex-shrink-0 mt-1"></span>
  222. <span class="flex-grow-1 pl-3 fw-600"><?php echo e(translate('Local Pickup')); ?></span>
  223. </span>
  224. </label>
  225. </div>
  226. <?php endif; ?>
  227. </div>
  228. <?php if($pickup_point_list): ?>
  229. <div class="mt-4 pickup_point_id_<?php echo e($key); ?> d-none">
  230. <select
  231. class="form-control aiz-selectpicker"
  232. name="pickup_point_id_<?php echo e($key); ?>"
  233. data-live-search="true"
  234. >
  235. <option><?php echo e(translate('Select your nearest pickup point')); ?></option>
  236. <?php $__currentLoopData = $pickup_point_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $pick_up_point): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  237. <option
  238. value="<?php echo e($pick_up_point->id); ?>"
  239. data-content="<span class='d-block'>
  240. <span class='d-block fs-16 fw-600 mb-2'><?php echo e($pick_up_point->getTranslation('name')); ?></span>
  241. <span class='d-block opacity-50 fs-12'><i class='las la-map-marker'></i> <?php echo e($pick_up_point->getTranslation('address')); ?></span>
  242. <span class='d-block opacity-50 fs-12'><i class='las la-phone'></i><?php echo e($pick_up_point->phone); ?></span>
  243. </span>"
  244. >
  245. </option>
  246. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  247. </select>
  248. </div>
  249. <?php endif; ?>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  255. <?php endif; ?>
  256. <div class="pt-4 d-flex justify-content-between align-items-center">
  257. <a href="<?php echo e(route('home')); ?>" >
  258. <i class="la la-angle-left"></i>
  259. <?php echo e(translate('Return to shop')); ?>
  260. </a>
  261. <button type="submit" class="btn fw-600 btn-primary"><?php echo e(translate('Continue to Payment')); ?></button>
  262. </div>
  263. </form>
  264. </div>
  265. </div>
  266. </div>
  267. </section>
  268. <?php $__env->stopSection(); ?>
  269. <?php $__env->startSection('script'); ?>
  270. <script type="text/javascript">
  271. function display_option(key){
  272. }
  273. function show_pickup_point(el) {
  274. var value = $(el).val();
  275. var target = $(el).data('target');
  276. // console.log(value);
  277. if(value == 'home_delivery'){
  278. if(!$(target).hasClass('d-none')){
  279. $(target).addClass('d-none');
  280. }
  281. }else{
  282. $(target).removeClass('d-none');
  283. }
  284. }
  285. </script>
  286. <?php $__env->stopSection(); ?>
  287. <?php echo $__env->make('frontend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/delivery_info.blade.php ENDPATH**/ ?>