Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('template.index')
- @section('contenido')
- <div class="col-md-12">
- <h1>Productos vendidos</h1>
- </div>
- <div class="table-cart col-md-12">
- <div class="table-responsive">
- @if(!$cart)
- <div class="no-cart col-md-12 text-center">
- <h3>No hay productos en el carrito</h3>
- </div>
- @else
- <p class="text-center">
- <a href="{{route('cart-trash')}}" class="btn btn-danger">
- Vaciar carro <i class="fa fa-trash"></i>
- </a>
- </p>
- <table class="table table-striped table-hover table-bordered">
- <thead>
- <tr>
- <th>Imagen</th>
- <th>Producto</th>
- <th>Precio</th>
- <th>Cantidad</th>
- <th>Subtotal</th>
- <th>Quitar</th>
- </tr>
- </thead>
- <tbody>
- @foreach($cart as $item)
- <tr>
- <td><img src="{{$item->image}}" alt="{{$item->name}}" title="{{$item->name}}" ></td>
- <td>{{$item->name}}</td>
- <td>$ {{number_format($item->price,2)}}</td>
- <td>
- <input id="product_{{$item->id}}" type="number" min="1" max="100" value="{{$item->quantity}}">
- <a href="" class="btn btn-warning btn-update-item" data-href="{{route('cart-update',$item->slug)}}" data-id="{{$item->id}}">
- <i class="fa fa-refresh"></i>
- </a>
- </td>
- <td>$ {{number_format($item->price * $item->quantity,2)}}</td>
- <td>
- <a href="{{route('cart-delete',$item->slug)}}" class="btn btn-danger">
- <i class="fa fa-remove"></i>
- </a>
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <hr>
- <div class="btn-cart text-center">
- <p>
- <a href="{{route('home')}}" class="btn btn-primary">
- <i class="fa fa-chevron-circle-left"></i> Seguir vendiendo
- </a>
- <a href="#" class="btn btn-primary">
- Continuar <i class="fa fa-chevron-circle-right"></i>
- </a>
- </p>
- </div>
- </div>
- @endsection
- @section('js')
- <script src="{{asset('js/cart-update.js')}}"></script>
- @endsection
Add Comment
Please, Sign In to add comment