@extends('theme.master') @section('title', 'All deals') @section('content') @include('admin.message') @include('sweetalert::alert') @section('meta_tags') @endsection

{{ __('Home') }} / {{ __('Flash deals') }} / {{ $deal->title }}

@php $mytime = Carbon\Carbon::now(); @endphp @if($mytime <= $deal->end_date)

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

  • days
  • hours
  • minutes
  • seconds
{!! $deal->detail !!}
@forelse($deal->saleitems as $item)
@if(isset($item->courses))
@if(isset($item->courses->preview_image)) ... @else ... @endif

{{ 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
@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
@else
{{ __('Flash Deal Ends') }}
@endif
@endsection @section('custom-script') @endsection