@php $product_discount = 0; @endphp @foreach($cartinfo as $key=>$value) {{$value->name}} @php $product = App\Models\Product::find($value->id); @endphp @if($product && ($product->sizes->isNotEmpty() || $product->colors->isNotEmpty()))
@if($product->sizes->isNotEmpty())
@endif @if($product->colors->isNotEmpty())
@endif
@endif
{{$value->price}} {{($value->price - $value->options->product_discount)*$value->qty}} @php $product_discount += $value->options->product_discount*$value->qty; Session::put('product_discount',$product_discount); @endphp @endforeach