@if (isset($packages, $paymentMethods) && $packages->count() > 0 && $paymentMethods->count() > 0)

{{ t('Premium Listing') }}

{{ t('premium_plans_hint') }}

@php $packageIdError = isset($errors) && $errors->has('package_id') ? ' is-invalid' : ''; $selectedPackageId = (int) request()->query('selected_package_id', null); @endphp
@foreach ($packages as $key => $package) @php $packageIds = $packages->pluck('id'); $checkedPackageId = $selectedPackageId > 0 && $packageIds->contains($selectedPackageId) ? $selectedPackageId : ($currentPackageId > 0 && $packageIds->contains($currentPackageId) ? $currentPackageId : optional($packages->first())->id); $badge = ''; $packageStatus = ''; $isAccountOnly = (bool) $package->is_account_only; $isCurrent = !empty($currentPackageId) && $currentPackageId == $package->id; $isRepost = !empty($is_repost); $hasPricingContext = isset($currentPackagePrice, $currentPaymentIsActive); if ($isAccountOnly) { $badge = 'Account Type'; if ($isCurrent && !$isRepost) { $badge .= ' ' . t('Current') . ''; } elseif ($isCurrent && $isRepost) { $badge .= ' Last Used'; } } else { if ($hasPricingContext) { if ($currentPackagePrice > $package->price) { $sameAccountType = auth()->user()->acctType->post_type_id === $post->post_type_id; if ($isRepost && $sameAccountType) { $packageStatus = ' disabled'; $badge = '' . t('Not available') . ''; } elseif ($isRepost) { $badge = '' . t('Upgrade') . ''; } else { $badge = 'Downgrade'; } } elseif ($currentPackagePrice < $package->price && $package->price > 0) { $badge = '' . t('Upgrade') . ''; } if ($isCurrent) { $badge = '' . t('Current') . ''; if (!$currentPaymentIsActive) { $badge .= ' ' . t('Payment pending') . ''; } if ($isRepost) { $badge = 'Last Used'; } } } elseif ($package->price > 0) { $badge = '' . t('Upgrade') . ''; } } @endphp @endforeach {{-- PAYMENT METHODS ROW --}}
id ? 'checked' : '' }} {{ $packageStatus }}>
    @foreach ((array) $package->description_array as $option)
  • * {!! $option !!}
  • @endforeach

@if ($package->currency->in_left) {!! $package->currency->symbol !!} @endif {{ $package->price }} @unless ($package->currency->in_left) {!! $package->currency->symbol !!} @endunless

@includeFirst([ config('larapen.core.customizedViewPath') . 'post.createOrEdit.inc.payment-methods', 'post.createOrEdit.inc.payment-methods', ])

{{ t('Payable Amount') }}: 0

@if (!empty($savedCards['cards']) && count($savedCards['cards']) > 0)
Saved Cards
@include('common.saved-card', [ 'btnText' => 'Pay & List', 'recurringPaymentOption' => true, ])
@endif
Pay with New Card +
@includeFirst([ config('larapen.core.customizedViewPath') . 'post.createOrEdit.inc.payment-methods.plugins', 'post.createOrEdit.inc.payment-methods.plugins', ])
@endif @section('after_styles') @parent @endsection @push('after_scripts_stack') @endpush