@if($step == 1)
{{-- Show current product, we also allow config upgrades so they can use that --}}
{{ __('services.current_plan') }}
@if(theme('small_images', false))
@endif
@if ($service->product->image)
@endif
{{ $service->product->name }}
@if(theme('small_images', false))
@endif
{!! $service->product->description !!}
@if($service->plan->type == 'recurring')
{{ __('services.price_every_period', [
'price' => $service->product->price(null, $service->plan->billing_period, $service->plan->billing_unit,
$service->currency_code),
'period' => $service->plan->billing_period > 1 ? $service->plan->billing_period : '',
'unit' => strtolower(trans_choice(__('services.billing_cycles.' . $service->plan->billing_unit), $service->plan->billing_period))
]) }}
@else
{{ __('services.price_one_time', [
'price' => $service->product->price(null, null, null, $service->currency_code),
]) }}
@endif
@foreach ($service->productUpgrades() as $product)
@if($upgrade == $product->id)
{{ __('services.new_plan') }}
@endif
@if(theme('small_images', false))
@endif
@if ($product->image)
@endif
{{ $product->name }}
@if(theme('small_images', false))
@endif
{!! $product->description !!}
@if($service->plan->type == 'recurring')
{{ __('services.price_every_period', [
'price' => $product->price(null, $service->plan->billing_period, $service->plan->billing_unit,
$service->currency_code),
'period' => $service->plan->billing_period > 1 ? $service->plan->billing_period : '',
'unit' => trans_choice(__('services.billing_cycles.' . $service->plan->billing_unit), $service->plan->billing_period)
]) }}
@else
{{ __('services.price_one_time', [
'price' => $product->price(null, null, null, $service->currency_code),
]) }}
@endif
@endforeach
@else
@foreach ($upgradeProduct->upgradableConfigOptions as $configOption)
@php
$showPriceTag = $configOption->children->filter(fn ($value) => !$value->price(billing_period: $service->plan->billing_period, billing_unit: $service->plan->billing_unit)->is_free)->count() > 0;
@endphp
{{-- If the config option is a select, show the options --}}
@if ($configOption->type == 'select')
@foreach ($configOption->children as $configOptionValue)
{{ $configOptionValue->name }}
{{ ($showPriceTag && $configOptionValue->price(billing_period: $service->billing_period, billing_unit: $service->billing_unit)->available) ? ' - ' . $configOptionValue->price(billing_period: $service->billing_period, billing_unit: $service->billing_unit) : '' }}
@endforeach
@elseif($configOption->type == 'radio')
@foreach ($configOption->children as $configOptionValue)
{{ $configOptionValue->name }}
{{ ($showPriceTag && $configOptionValue->price(billing_period: $service->billing_period, billing_unit: $service->billing_unit)->available) ? ' - ' . $configOptionValue->price(billing_period: $service->billing_period, billing_unit: $service->billing_unit) : '' }}
@endforeach
@endif
@endforeach
@endif
{{ __('services.upgrade_summary') }}:
{{ __('services.current_plan') }}:
{{ $service->product->name }}
@if($upgrade != $service->product->id)
{{ __('services.new_plan') }}:
{{ $upgradeProduct ? $upgradeProduct->name : __('general.select_plan') }}
@endif
{{-- Total today --}}
{{ __('services.total_today') }}:
{{ $this->totalToday() }}
{{-- If the next upgradeProduct supports config upgrades, show those --}}
@if($upgradeProduct && $upgradeProduct->upgradableConfigOptions()->count() > 0 && $step == 1)
{{ __('services.next_step') }}
@else
{{ __('services.upgrade') }}
@endif