@php $total = 0; @endphp
@foreach((array) session('buildpc') as $id => $details)
@php
if($details['status_variant'] == 1){
$total += $details['price'] * $details['quantity'] ;
}else{
if ($details['discount'] > 0) {
$total += $details['discount'] * $details['quantity'] ;
}else{
$total += $details['price'] * $details['quantity'] ;
}
}
@endphp
@endforeach
@foreach ($build as $item)
@if ($item['pro_id'] != 0)
{{$item['title']}}
{{$item['name']}}
@if ($item['price'] > 0)
@if ($item['status_variant'] == 1)
{{get_price_variant($item['pro_id'])}}₫
{{number_format($item['price'])}}₫
@else
{{number_format($item['discount'])}}₫
{{number_format($item['price'])}}₫
@endif
@else
Liên hệ
@endif
@else
@endif
@endforeach
@if ($total > 0)
@else
@endif