@extends('admin.layouts.app') @section('title', __('admin.edit_product_seo')) @section('breadcrumb') @endsection @section('page-header')

{{ __('admin.edit_product_seo') }}

{{ $product->name ?: $product->code }} - {{ $availableLocales[$locale]['native'] }}

{{ __('admin.edit_product') }} {{ __('admin.back_to_products') }}
@endsection @section('content')
@csrf @method('PUT')
{{ __('admin.product_information') }}
@if($product->main_image) {{ $product->name }} @else
@endif

{{ __('admin.product_name') }}: {{ $translation->name ?: $product->code }}

{{ __('admin.product_code') }}: {{ $product->code }}

{{ __('admin.sku') }}: {{ $product->sku }}

{{ __('admin.price') }}: {{ number_format($product->current_price, 2) }} {{ __('admin.currency') }}

{{ __('admin.status') }}: {{ $product->is_active ? __('admin.active') : __('admin.inactive') }}

{{ __('admin.categories') }}: @foreach($product->categories->take(3) as $category) {{ $category->translate($locale)->name ?? $category->name }} @endforeach

{{ __('admin.seo_settings') }}
0/60
@error('meta_title')
{{ $message }}
@enderror
{{ __('admin.meta_title_help') }}
{{ __('admin.suggestion') }}: {{ $translation->name }} - {{ __('admin.your_store_name') }}
0/160
@error('meta_description')
{{ $message }}
@enderror
{{ __('admin.meta_description_help') }} @if($translation->short_description)
{{ __('admin.suggestion') }}: {{ Str::limit($translation->short_description, 150) }} @endif
@error('meta_keywords')
{{ $message }}
@enderror
{{ __('admin.meta_keywords_help') }}
@error('focus_keywords')
{{ $message }}
@enderror
{{ __('admin.focus_keywords_help') }}
{{ __('admin.advanced_seo') }}
@error('og_title')
{{ $message }}
@enderror
@error('og_description')
{{ $message }}
@enderror
is_active) ? 'checked' : '' }}>
{{ __('admin.seo_preview') }}
{{ $translation->meta_title ?: $translation->name ?: $product->code }}
{{ route('products.show', $translation->slug ?? $product->id) }}
{{ $translation->meta_description ?: $translation->short_description ?: __('admin.product_preview_default') }}
{{ __('admin.seo_score') }}
65
{{ __('admin.needs_improvement') }}
{{ __('admin.recommendations') }}:
  • {{ __('admin.add_meta_title') }}
  • {{ __('admin.add_meta_description') }}
  • {{ __('admin.product_has_images') }}
{{ __('admin.content_analysis') }}
@if($translation->description) @php $wordCount = str_word_count(strip_tags($translation->description)); $readingTime = ceil($wordCount / 200); @endphp
{{ __('admin.word_count') }} {{ $wordCount }}
{{ __('admin.reading_time') }} {{ $readingTime }} {{ __('admin.minutes') }}
{{ __('admin.images') }} {{ $product->images->count() }}
@else

{{ __('admin.no_content_to_analyze') }}

@endif
{{ __('admin.quick_actions') }}
{{ __('admin.related_products_seo') }}
@if($product->categories->count() > 0) @php $relatedProducts = App\Models\Product::whereHas('categories', function($query) use ($product) { $query->whereIn('categories.id', $product->categories->pluck('id')); }) ->where('id', '!=', $product->id) ->with('translations') ->limit(5) ->get(); @endphp @if($relatedProducts->count() > 0)
@foreach($relatedProducts as $related) @php $relatedTranslation = $related->translate($locale); $hasSeo = $relatedTranslation && ($relatedTranslation->meta_title || $relatedTranslation->meta_description); @endphp
{{ $relatedTranslation->name ?? $related->code }}
{{ $hasSeo ? __('admin.seo_configured') : __('admin.seo_missing') }} {{ __('admin.edit_seo') }}
@endforeach
@else

{{ __('admin.no_related_products') }}

@endif @else

{{ __('admin.product_has_no_categories') }}

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush