diff --git a/packages/Sarga/API/Http/Controllers/Categories.php b/packages/Sarga/API/Http/Controllers/Categories.php index a4bdbc696..3ff514cf8 100644 --- a/packages/Sarga/API/Http/Controllers/Categories.php +++ b/packages/Sarga/API/Http/Controllers/Categories.php @@ -37,10 +37,12 @@ class Categories extends CategoryController } ]) ->find($id); + $brendler = $category->brands()->has('products')->get(); + if($category) return response([ 'attributes' => Attribute::collection($category->filterableAttributes), - 'brands' => Brand::collection($category->brands), + 'brands' => Brand::collection($brendler), ]); else{ return response(['error'=>'not found'],404); diff --git a/packages/Sarga/Admin/src/Resources/views/catalog/attributes/edit.blade.php b/packages/Sarga/Admin/src/Resources/views/catalog/attributes/edit.blade.php new file mode 100644 index 000000000..537f02f2f --- /dev/null +++ b/packages/Sarga/Admin/src/Resources/views/catalog/attributes/edit.blade.php @@ -0,0 +1,583 @@ +@php + $allLocales = app('Webkul\Core\Repositories\LocaleRepository')->all(); +@endphp + +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.catalog.attributes.edit-title') }} +@stop + +@section('content') +
+
+ + + +
+
+ @csrf() + + + + +
+ +
+ + + + +
+ +
+ @php + $selectedOption = old('type') ?: $attribute->type; + @endphp + + + + + + +
+ + + @if ($attribute->type == 'textarea') +
+ + + +
+ @endif + + {!! view_render_event('bagisto.admin.catalog.attribute.edit_form_accordian.general.controls.after', ['attribute' => $attribute]) !!} +
+
+ + +
+ +
+ + + +
+ + @foreach ($allLocales as $locale) +
+ + +
+ @endforeach + +
+
+ +
+ + +
+ + + +
+
+ +
+ + +
+
+ + +
+ +
+ + + +
+ + @if ($attribute->type == 'text') +
+ validation ?> + + +
+ @endif +
+
+ + +
+
+ + + +
+ +
+ + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+
+ +
+
+@stop + +@push('scripts') + + + +@endpush