@extends('Layouts/plain') @section('content')
@if (isset($error) && $error)
{{ $error }}
@endif @if (isset($success) && $success)
{{ $success }}
@endif {!! Form::open(['action' => $url]) !!}

@t('Modify Order: %s', $data->id)

@foreach ($products as $category) @if (isset($category->Products) && $category->Products)

{{ $category->name }}

@foreach ($category->Products as $product) @endforeach
@t('Product') @t('Price') @t('Qty')
{{ $product->name }}
@if ($product->description) {!! $product->description !!} @endif
@if ($product->actual_price) {{ amount($product->actual_price * $order_currency->exchange, ['Currency' => oa($order_currency)]) }} @elseif ($product->price) {{ amount($product->price * $order_currency->exchange, ['Currency' => oa($order_currency)]) }} @endif
{!! Form::whole_number( 'data[product][' . $product->id .']', ( isset($qtys->{$product->id}) ? $qtys->{$product->id} : ( isset($qtys->{$product->parent_id}) ? $qtys->{$product->parent_id} : null ) ), [ 'min'=>(isset($product->min_per_order) ? $product->min_per_order : 0), 'max'=>( isset($product->available) ? ( ( isset($product->max_per_order) && (int)$product->available > (int)$product->max_per_order ) ? $product->max_per_order : $product->available ) : ( ((int)$product->max_per_order > 0) ? $product->max_per_order : null ) ), 'class' => 'text-center form-control qty', 'placeholder' => 0, 'step' => 1, 'data-price' => ($product->actual_price ? $product->actual_price : $product->price) * $order_currency->exchange ] ) !!}
@endif @endforeach

{!! Form::close() !!}
@endsection