@extends('frontend.layouts.app') @section('content')
{{@$campaign->banner_image}}
@php $dateTime = date("Y-m-d H:i:s",strtotime($campaign->end_time)); @endphp

{{$campaign->name}}

{{translate('Days')}}

{{translate('Hours')}}

{{translate('Minutes')}}

{{translate('Seconds')}}

@foreach($campaign->products as $product)
{{$product->featured_image}}
{{translate('off')}} @if($product->pivot->discount_type == 0) {{show_currency()}}@else%@endif{{round(($product->pivot->discount))}}

{{$product->name}}

@php echo show_ratings($product->review->avg('rating')) @endphp
@php $price = (@$product->stock->first()?->price ?? $product->price); @endphp {{short_amount(discount($price,$product->pivot->discount,$product->pivot->discount_type))}} {{short_amount($price)}}
@php $randNum = rand(6666,10000000); $randNum = $randNum."_".$campaign->slug; @endphp
{{translate('Add to cart')}} @php $authUser = auth_user('web'); $wishedProducts = $authUser ? $authUser->wishlist->pluck('product_id')->toArray() : []; @endphp
@endforeach
@endsection @if($campaign) @push('scriptpush') @endpush @endif