@extends('admin.layouts.app') @section('title', __('admin.products.edit_product') . ': ' . $product->name) @section('content')
@csrf @method('PUT')
{{ __('admin.products.product_details') }}
{{ __('admin.products.server_module_hint') }}
{{ $packageList['error'] ?? __('admin.products.package_hint') }}
{{ __('admin.products.pricing') }}
@foreach($currencies as $currency) @php $p = $pricing[$currency->id] ?? null; @endphp

{{ $currency->code }} ({{ $currency->prefix }})

@foreach(['monthly','quarterly','semiannually','annually','biennially','triennially'] as $cycle)
@endforeach
@foreach(['monthly_setup','quarterly_setup','semiannually_setup','annually_setup'] as $setup)
@endforeach
@endforeach
{{-- Which packages this one can move to. Empty: any package of the same module. --}}
{{ __('admin.products.upgrade_paths') }}
@if(($upgradeCandidates ?? collect())->isEmpty())
{{ __('admin.products.upgrade_paths_none') }}
@else
{{ __('admin.products.upgrade_paths_hint') }}
@endif
@php $cfg = is_string($product->config_options) ? (json_decode($product->config_options, true) ?: []) : ($product->config_options ?? []); @endphp @include('admin.products.partials.proxmox')
{{ __('admin.products.panelica_resources') }} — {{ __('admin.products.panelica_resources_hint') }}
@if(!empty($panelicaPlans)) @else @endif
@if(!empty($panelicaTemplates)) @else @endif
{{ __('admin.products.app_needs_containers') }}
{{-- Selling ninety-eight apps as ninety-eight products does not scale, so one product can let the customer pick instead. --}} @php $numFields = [ 'res_cpu_percent'=>['CPU Limit (%) — 100 = 1 core',100],'res_memory_mb'=>['RAM (MB)',1024], 'res_inode_quota'=>['Inode Quota (-1 = unlimited)',-1],'res_iops'=>['IOPS (0 = unlimited)',0], 'res_io_mbs'=>['Disk I/O (MB/s)',0],'res_disk_mb'=>['Disk (MB)',5120], 'res_bandwidth_mb'=>['Bandwidth (MB)',51200],'res_process_limit'=>['Max Processes',100], 'res_max_domains'=>['Max Websites',1],'res_max_subdomains'=>['Max Subdomains',10], 'res_max_email'=>['Max Email',10],'res_max_db'=>['Max Databases',5], 'res_max_ftp'=>['Max FTP',5],'res_max_cron'=>['Max Cron',5], 'res_max_containers'=>['Max Containers',0],'res_network_mbit'=>['Network (Mbit/s)',0], 'res_php_memory_mb'=>['PHP Memory (MB)',256],'res_php_exec'=>['PHP Exec (s)',30], 'res_php_upload'=>['PHP Upload (MB)',64], ]; // The panel's defaults are filled in only for a Panelica product. On // a product without a module they were saved with every edit nobody // made, and the price list then offered "1 GB RAM, 1 vCPU, 5 GB" for // a product that has none of it. Left empty, Panelica applies the // same defaults itself. $resDefaults = strtolower((string) $product->server_type) === 'panelica'; @endphp
@foreach($numFields as $k => $meta)
@endforeach
{{-- The domain on the order form, and a free first year with it. --}}
{{ __('admin.products.domain_title') }}
@php($fdChosen = (array) old('free_domain_cycles', $product->freeDomainCycles()))
@foreach(['monthly', 'quarterly', 'semiannually', 'annually', 'biennially', 'triennially'] as $fdc) @endforeach

{{ __('admin.products.free_domain_hint') }}

{{ __('common.actions.cancel') }}
{{-- The product's own questions, asked on its order form. Their own forms, outside the product form above. --}} @php($productFields = \App\Models\CustomField::productFields($product->id)->get())
{{ __('admin.products.fields_title') }}

{{ __('admin.products.fields_hint') }}

@if($productFields->isNotEmpty()) @foreach($productFields as $field) @endforeach
{{ __('common.form.name') }}{{ __('common.table.type') }}
{{ $field->field_name }}@if($field->required) *@endif @if($field->admin_only)({{ __('admin.products.fields_admin_only') }})@endif {{ $field->field_type }}
@csrf @method('DELETE')
@endif
@csrf
@endsection @push('scripts') @endpush