@extends('admin.layouts.master-soyuz') @section('title', __('Widget Settings | ')) @section('body') @component('admin.component.breadcumb', ['secondaryactive' => 'active']) @slot('heading'){{ __('Widget Settings') }}@endslot @slot('menu1'){{ __('Storefront Widgets') }}@endslot @endcomponent @php $widgetMeta = [ 'slider' => [ 'label' => __('Hero Slider'), 'icon' => 'image', 'desc' => __('Big rotating banners at the top of the homepage.'), 'where' => __('Storefront homepage'), ], 'category' => [ 'label' => __('Shop by Category'), 'icon' => 'grid', 'desc' => __('Category tile grid that lets shoppers browse departments.'), 'where' => __('Storefront homepage'), ], 'hotdeals' => [ 'label' => __('Hot Deals Rail'), 'icon' => 'zap', 'desc' => __('Rose-amber rail of admin-tagged Hot Deals — only items with future end-dates render.'), 'where' => __('Storefront homepage'), ], 'newsletter' => [ 'label' => __('Newsletter Signup'), 'icon' => 'mail', 'desc' => __('Email subscribe form in the storefront footer.'), 'where' => __('Storefront footer (every page)'), ], ]; $widgetsByName = collect($widgets)->keyBy('name'); @endphp
@if($errors->any())
@foreach($errors->all() as $e)

{{ $e }}

@endforeach
@endif @if(session('updated') || session('success'))
{{ session('updated') ?? session('success') }}
@endif
{{ __('Storefront Widgets') }}
{{ __('Toggle each section on or off per page') }}
@foreach($widgetMeta as $name => $meta) @php $w = $widgetsByName->get($name); @endphp @if(!$w) @continue @endif @endforeach
{{ __('Widget') }} {{ __('Home') }} {{ __('Shop') }} {{ __('Save') }}
{{ $meta['label'] }}
{{ $meta['desc'] }}
{{ $meta['where'] }}
@csrf @method('PUT')
{{-- ============= CHAT WIDGETS ============= --}}
{{ __('Chat Widgets') }}
@csrf {{-- WhatsApp floating button --}}
{{ __('WhatsApp Floating Button') }}

{{ __('Show the floating WhatsApp button on every storefront page') }}
{{ __('With country code, no spaces or symbols (e.g. 911234567890).') }}
{{ __('CSS value, e.g. 60px') }}

{{-- Messenger chat bubble --}}
{{ __('Facebook Messenger Bubble') }}
{{ __('Optional. Paste the script URL Facebook gives you for your custom chat plugin. Leave blank to disable.') }}
{{ __('How widgets work') }}
  • • {{ __('Toggle a widget off and the corresponding storefront section is hidden — no other admin change needed.') }}
  • • {{ __('A widget that has no underlying data (e.g. zero active hot deals) will still hide automatically.') }}
  • • {{ __('"Home" controls visibility on the homepage, "Shop" on the catalog/shop pages.') }}
  • • {{ __('Changes apply immediately on the next page load.') }}
@endsection @push('script') @endpush