@extends('layouts.master') @section('header') @include('layouts.partials.header') @endsection @section('navbar') @include('layouts.partials.nav') @endsection @section('sidebar') @include('layouts.partials.sidebar') @endsection @section('content')

{{__("Edit Coupon")}}

{{ method_field('PATCH') }}
free_shipped==1) checked @endif type="radio" class="custom-control-input pl-2 validate[groupRequired[free_shipped]]" id="free" value="1" name="free_shipped">
free_shipped==0) checked @endif type="radio" class="custom-control-input validate[groupRequired[free_shipped]]" id="notFree" value="0" name="free_shipped">
type=='fixed') checked @endif type="radio" class="custom-control-input coupon-discount-amount pl-2 validate[groupRequired[type]]" id="fixed" value="fixed" name="type">
type=='percentage') checked @endif type="radio" class="custom-control-input coupon-discount-amount validate[groupRequired[type]]" id="percentage" value="percentage" name="type">
type=='fixed') disabled @endif type="text" min="1" max="100" value="{{$item->discount_amount}}" name="discount_amount" class="form-control @if($item->type=='percentage')validate[required,custom[number],max[100],min[1]] @endif" id="discount_amount" placeholder="{{__('Coupon Discount Amount')}}">
type=='fixed') style="display: none" @endif id="percentage-label" class="input-group-text">%
@foreach($customer_groups as $group)
groups) && in_array($group->id,$item->groups)) checked @endif value="{{$group->id}}" name="customer_groups[]" type="checkbox" id="group_{{$group->id}}" class="custom-control-input validate[minCheckbox[1]]" >
@endforeach
@foreach($coupon_countries as $country)
type=="percentage") style="display: none" @endif class="card-body row fixed_discount_wrapper">
 
{{$country->currency}}
{{__("Cities")}}
@foreach($country->cities as $city)
id,$city_ids[$country->id])) checked @endif name="cities[{{$country->id}}][]" type="checkbox" id="city_{{$city->id}}" class="custom-control-input repeatable-checkbox cities-checkbox validate[minCheckbox[1]]" >
@endforeach
{{__("Regions")}}
@foreach($country->regions()->whereIn("city_id",$city_ids[$country->id])->get(['id','name']) as $region)
id,$region_ids[$country->id])) checked @endif name="regions[{{$country->id}}][]" type="checkbox" id="group_{{$region->id}}" class="custom-control-input country-regions-checkbox validate[minCheckbox[1]]" >
@endforeach
{{__("Categories")}}
@foreach($country->categories as $cat)
id,$categories_ids[$country->id])) checked @endif name="categories[{{$country->id}}][]" data-country-id="{{$country->id}}" type="checkbox" id="cat_{{$cat->id}}_country_{{$country->id}}" class="custom-control-input repeatable-checkbox category-checkbox validate[minCheckbox[1]]" >
@endforeach
{{__("Products")}}
@foreach($country->products as $product)
id,$products_ids[$country->id])) checked @endif name="products[{{$country->id}}][]" type="checkbox" id="product_{{$product->id}}" class="custom-control-input cat-products-checkbox validate[minCheckbox[1]]" >
@endforeach
@php $prod_ids= implode(',',$products_ids[$country->id]) @endphp
@endforeach
status==1) checked @endif class="custom-control-input pl-2 radio validate[groupRequired[status]]" id="active" value="1" name="status">
status==0) checked @endif class="custom-control-input radio validate[groupRequired[status]]" id="inactive" value="0" name="status">
{{__("Back")}}
@endsection @section('footer') @include('layouts.partials.footer') @endsection @section('scripts') @include('layouts.partials.scripts') @endsection