@extends("front.layout.master") @section('title', __("All deals")) @section('meta_tags') @endsection @section("body")

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

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

{{ substr(strip_tags($item->variant->products->des), 0, 100)}}{{strlen(strip_tags($item->variant->products->des))>100 ? '...' : ""}}

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

@php $mainprice = 0; $get_product_data = new App\Http\Controllers\Api\MainController; $mainprice = $get_product_data->getprice($item->variant->products, $item->variant); $price = $mainprice->getData(); if($price->offerprice != '0'){ echo ''; echo sprintf("%.2f",$price->offerprice * $conversion_rate); }else{ echo ''; echo sprintf("%.2f",$price->mainprice * $conversion_rate); } $sellprice = $price->offerprice != 0 ? $price->offerprice : $price->mainprice; $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
{{ $item->simple_product->thumbnail }}

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

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

@php $mainprice = 0; if($item->simple_product->offer_price != '0'){ echo ''; echo sprintf("%.2f",$item->simple_product->offer_price * $conversion_rate); }else{ echo ''; echo sprintf("%.2f",$item->simple_product->price * $conversion_rate); } $sellprice = $item->simple_product->offer_price != 0 ? $item->simple_product->offer_price : $item->simple_product->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
@endsection @section('script') @endsection