@extends('layouts.admin.app',['page' => $menuAdmin['settings']['active'] ?? "", 'sub_page' => $menuAdmin['settings']['route']['notification']['sub_active'] ?? "" ]) @section('title', __('labels.notification_settings')) @section('header_data') @php $page_title = __('labels.notification_settings'); $page_pretitle = __('labels.admin') . " " . __('labels.settings'); @endphp @endsection @php $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('admin.dashboard')], ['title' => __('labels.settings'), 'url' => route('admin.settings.index')], ['title' => __('labels.notification_settings'), 'url' => null], ]; @endphp @section('admin-content')
@csrf

{{ __('labels.general') }}

@if(! $isDemoUser && !empty($settings['serviceAccountFileExist']))
                                                {{ json_encode($settings['serviceAccountFileData'] ?? null, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
                                                
@endif
@php // Use dynamic paths so this works across environments $cronLogPath = storage_path('logs/cron-log.txt'); $cronLogExists = file_exists($cronLogPath); $cronLogMTime = $cronLogExists ? @filemtime($cronLogPath) : null; $phpBinary = shell_exec('which php') ? trim(shell_exec('which php')) : '/usr/local/bin/php'; @endphp
{{ __('messages.add_cron_instruction') }}
                                                * * * * * {{$phpBinary}} {{ base_path('artisan') }} queue:work --stop-when-empty >> {{ storage_path('logs/cron-log.txt') }} 2>&1
                                            
{{ __('messages.php_path_note') }}
@if($cronLogExists) @else @endif
@php $abandonedCartChannels = $settings['abandonedCartNotificationChannels'] ?? ['push']; $channelAvailability = $settings['abandonedCartNotificationChannelAvailability'] ?? [ 'push' => false, 'email' => false, 'sms' => false, ]; @endphp

{{ __('labels.abandoned_cart_notifications') }}

{{ __('labels.abandoned_cart_notifications_description') }}

{{ __('labels.minutes') }}
{{ __('labels.abandoned_cart_notification_delay_hint') }}
{{ __('labels.always_enabled') }}
@foreach (['push', 'email', 'sms'] as $channel)
@if($channelAvailability[$channel] ?? false) {{ __('labels.notification_channel_configured') }} @else {{ __('labels.notification_channel_not_configured') }} @endif
@endforeach
{{ __('labels.abandoned_cart_channel_warning') }}
@endsection @push('scripts') @endpush