@extends('vendors.layout') @php Config::set('app.timezone', App\Models\BasicSettings\Basic::first()->timezone); @endphp @php $vendor = Auth::guard('vendor')->user(); $package = \App\Http\Helpers\VendorPermissionHelper::currentPackagePermission($vendor->id); @endphp @section('content') @if (is_null($package)) @php $pendingMemb = \App\Models\Membership::query() ->where([['vendor_id', '=', $vendor->id], ['status', 0]]) ->whereYear('start_date', '<>', '9999') ->orderBy('id', 'DESC') ->first(); $pendingPackage = isset($pendingMemb) ? \App\Models\Package::query()->findOrFail($pendingMemb->package_id) : null; @endphp @if ($pendingPackage)
{{ __('You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.') }}
{{ __('Pending Package') . ':' }} {{ $pendingPackage->title }} {{ $pendingPackage->term }} {{ __('Decision Pending') }}
@else @php $newMemb = \App\Models\Membership::query() ->where([['vendor_id', '=', Auth::id()], ['status', 0]]) ->first(); @endphp @if ($newMemb)
{{ __('Your membership is expired. Please purchase a new package / extend the current package.') }}
@endif
{{ __('Please purchase a new package .') }}
@endif @else
@if ($package_count >= 2 && $next_membership) @if ($next_membership->status == 0) {{ __('You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.') }}
@elseif ($next_membership->status == 1) {{ __('You have another package to activate after the current package expires. You cannot purchase / extend any package, until the next package is activated') }}
@endif @endif {{ __('Current Package') . ':' }} {{ $current_package->title }} {{ $current_package->term }} @if ($current_membership->is_trial == 1) ({{ __('Expire Date') . ':' }} {{ Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) {{ __('Trial') }} @else ({{ __('Expire Date') . ':' }} {{ $current_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) @endif @if ($package_count >= 2 && $next_package)
{{ __('Next Package To Activate') . ':' }} {{ $next_package->title }} {{ $next_package->term }} @if ($current_package->term != 'lifetime' && $current_membership->is_trial != 1) ( {{ __('Activation Date') . ':' }} {{ Carbon\Carbon::parse($next_membership->start_date)->format('M-d-Y') }}, {{ __('Expire Date') . ':' }} {{ $next_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($next_membership->expire_date)->format('M-d-Y') }}) @endif @if ($next_membership->status == 0) {{ __('Decision Pending') }} @endif
@endif
@endif
@foreach ($packages as $key => $package) @php $permissions = $package->features; if (!empty($package->features)) { $permissions = json_decode($permissions, true); } @endphp

{{ $package->title }}

@if (isset($current_package->id) && $current_package->id === $package->id)

{{ __('Current') }}

@endif @if ($package_count >= 2) @if ($next_package) @if ($next_package->id == $package->id)

{{ __('Next') }}

@endif @endif @endif
{{ $package->price == 0 ? 'Free' : format_price($package->price) }} @if ($package->term == 'monthly') / Monthly @elseif($package->term == 'yearly') / Yearly @elseif($package->term == 'lifetime') / Lifetime @endif
  • @if ($package->number_of_listing == 999999) {{ __('Listing (Unlimited)') }} @elseif($package->number_of_listing == 1) {{ __('Listing') }} ({{ $package->number_of_listing }}) @else {{ __('Listings') }}({{ $package->number_of_listing }}) @endif
  • @if ($package->number_of_images_per_listing == 999999) {{ __('Images Per Listing (Unlimited)') }} @elseif ($package->number_of_images_per_listing == 1) {{ __('Image Per Listing') }}({{ $package->number_of_images_per_listing }}) @else {{ __('Image Per Listings') }}({{ $package->number_of_images_per_listing }}) @endif
  • {{ __('Listing Enquiry Form') }}
  • {{ __('Video') }}
  • @if (is_array($permissions) && in_array('Amenities', $permissions)) @if ($package->number_of_amenities_per_listing == 999999) {{ __('Amenities Per Listing(Unlimited)') }} @elseif($package->number_of_amenities_per_listing == 1) {{ __('Amenitie Per Listing') }}({{ $package->number_of_amenities_per_listing }}) @else {{ __('Amenities Per Listing') }}({{ $package->number_of_amenities_per_listing }}) @endif @else {{ __('Amenities Per Listing') }} @endif
  • @if (is_array($permissions) && in_array('Feature', $permissions)) @if ($package->number_of_additional_specification == 999999) {{ __('Feature Per Listing (Unlimited)') }} @elseif($package->number_of_additional_specification == 1) {{ __('Feature Per Listing') }} ({{ $package->number_of_additional_specification }}) @else {{ __('Features Per Listing') }} ({{ $package->number_of_additional_specification }}) @endif @else {{ __('Feature Per Listing') }} @endif
  • @if (is_array($permissions) && in_array('Social Links', $permissions)) @if ($package->number_of_social_links == 999999) {{ __('Social Links Per Listing(Unlimited)') }} @elseif($package->number_of_social_links == 1) {{ __('Social Link Per Listing') }}({{ $package->number_of_social_links }}) @else {{ __('Social Links Per Listing') }} ({{ $package->number_of_social_links }}) @endif @else {{ __('Social Link Per Listing') }} @endif
  • @if (is_array($permissions) && in_array('FAQ', $permissions)) @if ($package->number_of_faq == 999999) {{ __('FAQs Per Listing(Unlimited)') }} @elseif($package->number_of_faq == 1) {{ __('FAQ Per Listing') }} ({{ $package->number_of_faq }}) @else {{ __('FAQs Per Listing') }} ({{ $package->number_of_faq }}) @endif @else {{ __('FAQ Per Listing') }} @endif
  • {{ __('Business Hours') }}
  • @if (is_array($permissions) && in_array('Products', $permissions)) @if ($package->number_of_products == 999999) {{ __('Products Per Listing (Unlimited)') }} @elseif($package->number_of_products == 1) {{ __('Product Per Listing') }}({{ $package->number_of_products }}) @else {{ __('Products Per Listing') }}({{ $package->number_of_products }}) @endif @else {{ __('Products Per Listing') }} @endif
  • @if (is_array($permissions) && in_array('Products', $permissions))
  • @if ($package->number_of_images_per_products == 999999) {{ __('Product Image Per Product (Unlimited)') }} @elseif($package->number_of_images_per_products == 1) {{ __('Product Image Per Product') }}({{ $package->number_of_images_per_products }}) @else {{ __('Product Images Per Product') }} ({{ $package->number_of_images_per_products }}) @endif
  • @else
  • {{ __('Product Image Per Product') }}
  • @endif @if (is_array($permissions) && in_array('Products', $permissions))
  • {{ __('Product Enquiry Form') }}
  • @else
  • {{ __('Product Enquiry Form') }}
  • @endif
  • {{ __('Messenger') }}
  • {{ __('WhatsApp') }}
  • {{ __('Telegram') }}
  • {{ __('Tawk.To') }}
  • @if (!is_null($package->custom_features)) @php $features = explode("\n", $package->custom_features); @endphp @if (count($features) > 0) @foreach ($features as $key => $value)
  • {{ $value }}
  • @endforeach @endif @endif
@php $hasPendingMemb = \App\Http\Helpers\VendorPermissionHelper::hasPendingMembership(Auth::id()); @endphp @if ($package_count < 2 && !$hasPendingMemb)
@if (isset($current_package->id) && $current_package->id === $package->id) @if ($package->term != 'lifetime' || $current_membership->is_trial == 1) {{ __('Extend') }} @endif @else {{ __('Buy Now') }} @endif
@endif
@endforeach
@endsection