3df426c1b9b332c5f382a69bc05e4bb61db4f951.php 1.9 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. $best_selling_products = Cache::remember('best_selling_products', 86400, function () {
  3. return filter_products(\App\Models\Product::query()->from("products as p")->where('published', 1)->orderBy('num_of_sale', 'desc'))->limit(20)->get();
  4. });
  5. ?>
  6. <?php if(get_setting('best_selling') == 1): ?>
  7. <section class="mb-4">
  8. <div class="container">
  9. <div class="px-2 py-4 px-md-4 py-md-3 bg-white shadow-sm rounded">
  10. <div class="d-flex mb-3 align-items-baseline border-bottom">
  11. <h3 class="h5 fw-700 mb-0">
  12. <span class="border-bottom border-primary border-width-2 pb-3 d-inline-block"><?php echo e(translate('Best Selling')); ?></span>
  13. </h3>
  14. <a href="javascript:void(0)" class="ml-auto mr-0 btn btn-primary btn-sm shadow-md"><?php echo e(translate('Top 20')); ?></a>
  15. </div>
  16. <div class="aiz-carousel gutters-10 half-outside-arrow" data-items="6" data-xl-items="5" data-lg-items="4" data-md-items="3" data-sm-items="2" data-xs-items="2" data-arrows='true' data-infinite='true'>
  17. <?php $__currentLoopData = $best_selling_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  18. <div class="carousel-box">
  19. <?php echo $__env->make('frontend.partials.product_box_1',['product' => $product], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  20. </div>
  21. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  22. </div>
  23. </div>
  24. </div>
  25. </section>
  26. <?php endif; ?>
  27. <?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/partials/best_selling_section.blade.php ENDPATH**/ ?>