@extends('theme.master') @section('title', 'All deals') @section('content') @include('admin.message') @include('sweetalert::alert') @section('meta_tags') @endsection @php $gets = App\Breadcum::first(); @endphp @if(isset($gets))
@if($gets['img'] !== NULL && $gets['img'] !== '') @else course @endif
@endif
@php $mytime = Carbon\Carbon::now(); @endphp @if($mytime <= $deal->end_date)

{{__("Sale ends in ")}}

  • {{__('days')}}
  • {{__('hours')}}
  • {{__('minutes')}}
  • {{__('seconds')}}
@forelse($deal->saleitems as $item)
@if(isset($item->courses))
@if(isset($item->courses->preview_image)) ... @else ... @endif
{{ $item->discount_type }}{{ $item->discount }}%

{{ substr(strip_tags($item->courses->detail), 0, 90)}}{{strlen(strip_tags($item->courses->detail))>90 ? '...' : ""}}


@php $mainprice = 0; if($item->courses->discount_price != '0'){ echo sprintf("%.2f",$item->courses->discount_price); }else{ echo sprintf("%.2f",$item->courses->price); } $sellprice = $item->courses->discount_price != 0 ? $item->courses->discount_price : $item->courses->price; $discount = $item->discount; $discount_type = $item->discount_type; $discounted_amount = 0; if($discount_type == 'upto'){ $random_no = rand(0,$discount); $discounted_amount = $sellprice * $random_no / 100; }else{ $discounted_amount = $sellprice * $discount / 100; } $deal_price = $sellprice - $discounted_amount; @endphp
@csrf
@else
...

{{ substr(strip_tags($item->courses->detail), 0, 100)}}{{strlen(strip_tags($item->courses->detail))>100 ? '...' : ""}}

Discount : {{ $item->discount }}% ({{ $item->discount_type }})

@php $mainprice = 0; if($item->courses->discount_price != '0'){ echo sprintf("%.2f",$item->courses->discount_price); }else{ echo sprintf("%.2f",$item->courses->price); } $sellprice = $item->courses->discount_price != 0 ? $item->courses->discount_price : $item->courses->price; $discount = $item->discount; $discount_type = $item->discount_type; $discounted_amount = 0; if($discount_type == 'upto'){ $random_no = rand(0,$discount); $discounted_amount = $sellprice * $random_no / 100; }else{ $discounted_amount = $sellprice * $discount / 100; } $deal_price = $sellprice - $discounted_amount; @endphp
@csrf
@endif
@empty

{{__("No products found !")}}

@endforelse
{!! $deal->detail !!}
@else
{{ __('Flash Deal Ends') }}
@endif
@endsection @section('custom-script') @endsection