best_sellers_section.blade.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. @php
  2. $best_selers = \App\Models\Shop::where('verification_status', 1)->orderBy('num_of_sale', 'desc')->take(20)->get();
  3. @endphp
  4. @if (get_setting('vendor_system_activation') == 1)
  5. <section class="mb-4">
  6. <div class="container">
  7. <div class="px-2 py-4 px-md-4 py-md-3 bg-white shadow-sm rounded">
  8. <div class="d-flex mb-3 align-items-baseline border-bottom">
  9. <h3 class="h5 fw-700 mb-0">
  10. <span class="border-bottom border-primary border-width-2 pb-3 d-inline-block">{{ translate('Best Sellers')}}</span>
  11. </h3>
  12. <a href="{{ route('sellers') }}" class="ml-auto mr-0 btn btn-primary btn-sm shadow-md">{{ translate('View All Sellers') }}</a>
  13. </div>
  14. <div class="aiz-carousel gutters-10 half-outside-arrow" data-items="3" data-lg-items="3" data-md-items="2" data-sm-items="2" data-xs-items="1" data-rows="2">
  15. @foreach ($best_selers as $key => $seller)
  16. @if ($seller->user != null)
  17. <div class="carousel-box">
  18. <div class="row no-gutters box-3 align-items-center border border-light rounded hov-shadow-md my-2 has-transition">
  19. <div class="col-4">
  20. <a href="{{ route('shop.visit', $seller->slug) }}" class="d-block p-3">
  21. <img
  22. src="{{ static_asset('assets/img/placeholder.jpg') }}"
  23. data-src="@if ($seller->logo !== null) {{ uploaded_asset($seller->logo) }} @else {{ static_asset('assets/img/placeholder.jpg') }} @endif"
  24. alt="{{ $seller->name }}"
  25. class="img-fluid lazyload"
  26. >
  27. </a>
  28. </div>
  29. <div class="col-8 border-left border-light">
  30. <div class="p-3 text-left">
  31. <h2 class="h6 fw-600 text-truncate">
  32. <a href="{{ route('shop.visit', $seller->slug) }}" class="text-reset">{{ $seller->name }}</a>
  33. </h2>
  34. <div class="rating rating-sm mb-2">
  35. {{ renderStarRating($seller->rating) }}
  36. </div>
  37. <a href="{{ route('shop.visit', $seller->slug) }}" class="btn btn-soft-primary btn-sm">
  38. {{ translate('Visit Store') }} <i class="las la-angle-right"></i>
  39. </a>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. @endif
  45. @endforeach
  46. </div>
  47. </div>
  48. </div>
  49. </section>
  50. @endif