Eshop-Laravel/resources/views/cms/userOrder.blade.php
2019-10-18 12:25:37 +03:00

32 lines
1 KiB
PHP

@extends('cms.cms-master')
@section('main_content')
@php
$sum =0;
@endphp
@foreach (unserialize($order[0]->data) as $value)
<div class="item">
<div class="row d-flex align-items-center">
<div class="col-6">
<div class="d-flex align-items-center">
<img width="90" src="{{asset('images') . '/'. $value['attributes']['img']}}" alt="..." class="img-fluid">
<div class="title"><a href="detail.html">
<h6>{{$value['name']}}</h6>
<span class="text-muted">Size: Large</span></a></div>
</div>
</div>
<div class="col-2"><span>${{$value['price']}}</span></div>
<div class="col-2">{{$value['quantity']}}</div>
<div class="col-2 text-right"><span>${{$totle = $value['price'] * $value['quantity'] }}</span>
</div>
</div>
</div>
@php
$sum = $sum +$totle;
@endphp
@endforeach
<h2>Total :$ {{$sum}} + $10 shipping = <span style="color:purple"> ${{$sum + 10}}</span></h2>
<a href="{{url('cms/getUserOrders/' . $order[0]->user_id)}}">Go Back</a>
@endsection