@if($activeDeals->isEmpty())
No active deals.
@else| Image | Product | Deal applied | Compare discount | Time left |
|---|---|---|---|---|
|
@if($dp->image_url)
|
{{ $dp->title }} |
@php
$pt = $dp->profit_type ?? $deal->profit_type;
$pv = $dp->profit_value !== null ? (float) $dp->profit_value : (float) $deal->profit_value;
@endphp
@if($pt === 'percentage')
{{ number_format($pv, 0) }}% profit
@else
${{ number_format($pv, 2) }} profit
@endif
Cost {{ $dp->cost !== null ? '$' . number_format($dp->cost, 2) : '—' }} Sale ${{ number_format($dp->deal_price, 2) }} |
@if(($deal->compare_at_mode ?? 'use_original') === 'use_original')
@php $prevVal = $dp->deal_compare_at_price ?? $dp->original_price; @endphp
Previous price
@if($prevVal !== null && $prevVal > 0)
${{ number_format($prevVal, 2) }} @endif @else {{ number_format($deal->compare_discount_percent ?? 0, 0) }}% off @endif |
-- |