@extends('admin.layouts.master') @section('content')

{{ trans('app.shipping_zones') }}

@can('create', \App\Models\ShippingZone::class) {{ trans('app.add_shipping_zone') }} @endcan
@forelse($shipping_zones as $shipping_zone)
{{ $shipping_zone->name }} @if ($shipping_zone->rest_of_the_world) {{ trans('app.rest_of_the_world') }} @endif @unless ($shipping_zone->active) {{ trans('app.inactive') }} @endunless {{ $shipping_zone->tax->name . ' (' . $shipping_zone->tax->label . ')' }}
@can('create', \App\Models\ShippingRate::class) @endcan @unless ($shipping_zone->rest_of_the_world) @can('create', \App\Models\ShippingZone::class) {{ trans('app.add_shipping_country') }} @endcan @endunless @can('update', $shipping_zone) {{ trans('app.edit') }} @endcan @can('delete', $shipping_zone) {!! Form::open(['route' => ['admin.shipping.shippingZone.destroy', $shipping_zone->id], 'method' => 'delete', 'class' => 'inline']) !!} {!! Form::button(' ' . trans('app.delete'), ['type' => 'submit', 'class' => 'confirm btn btn-danger btn-flat']) !!} {!! Form::close() !!} @endcan
    @if ($shipping_zone->rest_of_the_world)
  • {{ trans('help.rest_of_the_world') }}

  • @else @if (!empty($shipping_zone->country_ids)) @php $countries = get_countries_in_shipping_zone($shipping_zone); @endphp @foreach ($countries as $country)
  • {!! get_formated_country_name($country->name, $country->iso_code) !!}

    @unless ($country->in_active_business_area) {{ trans('app.not_in_business_area') }} @endunless {!! Form::open(['route' => ['admin.shipping.shippingZone.removeCountry', $shipping_zone->id, $country->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent small text-muted pull-right', 'title' => trans('app.remove'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @if ($country->states_count)

    {{ trans('app._of_states', ['states' => $shipping_zone->state_ids ? count(array_intersect($shipping_zone->state_ids, $country->states->pluck('id')->toArray())) : '0', 'allStates' => $country->states_count]) }} @if ($country->in_active_business_area) {{ trans('app.edit') }} @endif

    @endif
  • @endforeach @else
  • {{ trans('app.empty_shipping_country') }}

  • @endif @endif
    @forelse($shipping_zone->rates as $shipping)
  • {{ $shipping->name }} @if ($shipping->carrier) {{ trans('app.by') . ' ' . $shipping->carrier->name . ' ' . trans('app.and_takes', ['time' => $shipping->delivery_takes]) }} @endif @can('delete', $shipping) {!! Form::open(['route' => ['admin.shipping.shippingRate.destroy', $shipping->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent small text-muted pull-right', 'title' => trans('app.delete'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

    {{ get_formated_shipping_range_of($shipping) }} {{ $shipping->rate > 0 ? get_formated_currency($shipping->rate, 2, config('system_settings.currency.id')) : trans('app.free') }} @can('update', $shipping) {{ trans('app.edit') }} @endcan

  • @empty
  • {{ trans('app.empty_shipping_rates') }}

  • @endforelse
@unless ($loop->last)
@endunless
@empty

{{ 'Opps !' }}

{{ trans('app.empty_shipping_zones') }}

@endforelse
@endsection