@extends('app') @section('content')
@if($errors->add_cart->count() > 0)
@foreach($errors->add_cart->keys() as $item_id)

No se pudo agregar la pieza "{{App\Combination::find($item_id)->name}}". @if(($added = $errors->add_cart->first($item_id)) > 0) Solo se pudieron añadir {{$added}} piezas al carrito. @endif

@endforeach
@endif @if(with($items = Cart::items())->count() == 0)
Tu carrito aún no tiene artículos.
@else
@foreach($items as $item)

{{ $item->model->name}} {{ $item->combination->name}} {{$item->line->name}}

{{$item->quantity}}

@if($item->size)

{{$item->size->name}}

@endif @if($item->combination->colors()->count() > 0)

{!!$item->color ? ($item->color->photo ? Html::image($item->color->photo->thumbnail->url('thumb')) : $item->color->name) : 'N/A' !!}

$ {{ number_format($item->quantity * $item->combination->price, 2) }}

@endif
@endforeach

$ {{ number_format(Cart::subtotal($items), 2) }}

$ {{ number_format(Cart::shippingAmount($items),2) }}

$ {{ number_format(Cart::total($items),2) }}

@if(Auth::guest()) @else
@endif
@endif
{!!Form::model(Auth::user(), [ 'action' => 'CheckoutController@postPaypalPayment', ]) !!} {!! Form::close() !!} @endsection @section('style') {!! Html::style('/css/cart.css') !!} @endsection @section('script') @if($errors->address->count() > 0) @endif {!! Html::script('js/cart.js') !!} @endsection