@php /** * THE pricing section — one markup, two surfaces. The partner page renders it * in place; the signup "Change plan" popup renders the very same section in a * fullscreen modal, so a plan is always compared on the same card it was first * sold from. Lifted verbatim from public/partner.php; every class, figure and * behaviour (the Monthly/Annual toggle, the struck-through year, the CTA that * carries ?plan and &cycle=annual) is the section's own. * * @var array $plans active plan rows (name, slug, price, billing_cycle, * max_menu_items, commission_percent, features) * @var bool $annualOn the annual offer is on AND at least one tier sells annually * @var float $annualPct the operator's annual discount percentage */ $cur = setting('currency_symbol', '$'); $cycleMap = [ 'monthly' => t_raw('partner.cycle_monthly'), 'yearly' => t_raw('partner.cycle_yearly'), 'lifetime' => t_raw('partner.cycle_lifetime'), ]; // The first PAID tier wears the Most Popular flag — the same rule the page has // always applied. $popularSlug = ''; foreach ($plans as $p) { if ((float) $p['price'] > 0) { $popularSlug = (string) $p['slug']; break; } } /* The switchable services this install offers, in the page's own order, each named by its capability label — appended to every card's feature list exactly as the section has always done. */ $svcCap = \App\Services\Capability::class; $svcEyebrows = []; foreach ([$svcCap::POS, $svcCap::QR, $svcCap::KIOSK, $svcCap::KDS, $svcCap::SCREENS, $svcCap::PRINT_MENU, $svcCap::RESERVATIONS, $svcCap::LOYALTY] as $svcKey) { if (!$svcCap::lacks($svcKey)) { $svcEyebrows[] = $svcCap::label($svcKey); } } // The AI assistant rides the same rule as the services: a platform-wide switch // (admin -> Settings -> AI), on every card while it is on, gone when it is off. // Same label the vendor sidebar wears. if (setting('ai_vendor_enabled', '1') === '1') { $svcEyebrows[] = t_raw('nav.ai_assistant'); } @endphp
{{ t_raw('partner.pricing_eyebrow') }}

{{ t_raw('partner.pricing_title') }}

{{ t_raw('partner.pricing_sub') }}

@if (!empty($annualOn)) @php /* Monthly first — the toggle is an OFFER of the annual saving, not a default. */ @endphp
@endif
@if ($plans)
@foreach ($plans as $p) @php $price = (float) $p['price']; $isFree = $price <= 0; $isPopular = ((string) $p['slug'] === $popularSlug); $features = array_filter(array_map('trim', explode('|', (string) ($p['features'] ?? '')))); // The systems shown on the partner page, continuing the tier's own list rather // than sitting in a band of their own — one list per card, one style. Today // every plan carries every enabled service because the switches are // platform-wide; when a package gains its own selection, this is the single // line that changes. foreach ($svcEyebrows as $inc) { $features[] = $inc; } $cycle = $isFree ? t_raw('partner.cycle_forever') : ($cycleMap[$p['billing_cycle']] ?? ''); /* The annual variant, priced server-side (never in the browser) so the swap is a display change, not arithmetic. NET, exactly as the monthly figure above. */ $sellsAnnually = !empty($annualOn) && \App\Models\Subscription::sellsAnnually($p); $yearlyPrice = $sellsAnnually ? \App\Models\Subscription::priceFor($p, 'yearly') : 0.0; @endphp
@if ($isPopular){{ t_raw('home.collections.most_popular') }}@endif

{{ $p['name'] }}

@if ($isFree) {{ t_raw('common.free') }} @else @if ($sellsAnnually && (float) ($annualPct ?? 0) > 0){{ $cur }}{{ number_format($price * 12, 0) }}@endif {{ $cur }}{{ number_format($price, 0) }}{{ $cycle }} @if ($sellsAnnually){{ t_raw('partner.billed_annually_note') }}@endif @endif

{!! (int) $p['max_menu_items'] > 0 ? t('partner.plan_menu_items', [':n' => (string) (int) $p['max_menu_items']]) : t('partner.plan_menu_items_unlimited') !!} · {{ t_raw('partner.plan_commission', [':percent' => rtrim(rtrim(number_format((float) $p['commission_percent'], 2), '0'), '.')]) }}

    @foreach ($features as $f)
  • {{ $f }}
  • @endforeach
@php // Plans stay readable while applications are closed; only the way in goes. @endphp @if (vendor_signup_open()) {!! $isFree ? t('partner.plan_cta_free') : t('partner.plan_cta_choose', [':plan' => $p['name']]) !!} @endif
@endforeach

{{ t_raw('partner.pricing_note') }}

@if (!empty($annualOn)) @endif @else

{{ t_raw('partner.pricing_empty') }}

@endif