3744ffbac3e519024d868ad5e5297bc8645c70f2.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php $__env->startSection('content'); ?>
  2. <section class="pt-4 mb-4">
  3. <div class="container text-center">
  4. <div class="row">
  5. <div class="col-lg-6 text-center text-lg-left">
  6. <h1 class="fw-600 h4"><?php echo e(translate('Compare')); ?></h1>
  7. </div>
  8. <div class="col-lg-6">
  9. <ul class="breadcrumb bg-transparent p-0 justify-content-center justify-content-lg-end">
  10. <li class="breadcrumb-item opacity-50">
  11. <a class="text-reset" href="<?php echo e(route('home')); ?>"><?php echo e(translate('Home')); ?></a>
  12. </li>
  13. <li class="text-dark fw-600 breadcrumb-item">
  14. <a class="text-reset" href="<?php echo e(route('compare.reset')); ?>">"<?php echo e(translate('Compare')); ?>"</a>
  15. </li>
  16. </ul>
  17. </div>
  18. </div>
  19. </div>
  20. </section>
  21. <section class="mb-4">
  22. <div class="container text-left">
  23. <div class="bg-white shadow-sm rounded">
  24. <div class="p-3 border-bottom d-flex justify-content-between align-items-center">
  25. <div class="fs-15 fw-600"><?php echo e(translate('Comparison')); ?></div>
  26. <a href="<?php echo e(route('compare.reset')); ?>" style="text-decoration: none;" class="btn btn-soft-primary btn-sm fw-600"><?php echo e(translate('Reset Compare List')); ?></a>
  27. </div>
  28. <?php if(Session::has('compare')): ?>
  29. <?php if(count(Session::get('compare')) > 0): ?>
  30. <div class="p-3">
  31. <table class="table table-responsive table-bordered mb-0">
  32. <thead>
  33. <tr>
  34. <th scope="col" style="width:16%" class="font-weight-bold">
  35. <?php echo e(translate('Name')); ?>
  36. </th>
  37. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  38. <th scope="col" style="width:28%" class="font-weight-bold">
  39. <a class="text-reset fs-15" href="<?php echo e(route('product', \App\Models\Product::find($item)->slug)); ?>"><?php echo e(\App\Models\Product::find($item)->getTranslation('name')); ?></a>
  40. </th>
  41. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <tr>
  46. <th scope="row"><?php echo e(translate('Image')); ?></th>
  47. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  48. <td>
  49. <img loading="lazy" src="<?php echo e(uploaded_asset(\App\Models\Product::find($item)->thumbnail_img)); ?>" alt="<?php echo e(translate('Product Image')); ?>" class="img-fluid py-4">
  50. </td>
  51. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  52. </tr>
  53. <tr>
  54. <th scope="row"><?php echo e(translate('Price')); ?></th>
  55. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  56. <?php
  57. $product = \App\Models\Product::find($item);
  58. ?>
  59. <td>
  60. <?php if(home_base_price($product) != home_discounted_base_price($product)): ?>
  61. <del class="fw-600 opacity-50 mr-1"><?php echo e(home_base_price($product)); ?></del>
  62. <?php endif; ?>
  63. <span class="fw-700 text-primary"><?php echo e(home_discounted_base_price($product)); ?></span>
  64. </td>
  65. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  66. </tr>
  67. <tr>
  68. <th scope="row"><?php echo e(translate('Brand')); ?></th>
  69. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  70. <td>
  71. <?php if(\App\Models\Product::find($item)->brand != null): ?>
  72. <?php echo e(\App\Models\Product::find($item)->brand->getTranslation('name')); ?>
  73. <?php endif; ?>
  74. </td>
  75. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  76. </tr>
  77. <tr>
  78. <th scope="row"><?php echo e(translate('Category')); ?></th>
  79. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  80. <td>
  81. <?php if(\App\Models\Product::find($item)->category != null): ?>
  82. <?php echo e(\App\Models\Product::find($item)->category->getTranslation('name')); ?>
  83. <?php endif; ?>
  84. </td>
  85. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  86. </tr>
  87. <tr>
  88. <th scope="row"></th>
  89. <?php $__currentLoopData = Session::get('compare'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  90. <td class="text-center py-4">
  91. <button type="button" class="btn btn-primary fw-600" onclick="showAddToCartModal(<?php echo e($item); ?>)">
  92. <?php echo e(translate('Add to cart')); ?>
  93. </button>
  94. </td>
  95. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  96. </tr>
  97. </tbody>
  98. </table>
  99. </div>
  100. <?php endif; ?>
  101. <?php else: ?>
  102. <div class="text-center p-4">
  103. <p class="fs-17"><?php echo e(translate('Your comparison list is empty')); ?></p>
  104. </div>
  105. <?php endif; ?>
  106. </div>
  107. </div>
  108. </section>
  109. <?php $__env->stopSection(); ?>
  110. <?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/view_compare.blade.php ENDPATH**/ ?>