@extends('admin.layout') @section('content') @php $vendorId = $vendor_id; if ($vendorId == 0) { $permissions = [ 'Listing Enquiry Form', 'Video', 'Amenities', 'Feature', 'Social Links', 'FAQ', 'Business Hours', 'Products', 'Product Enquiry Form', 'Messenger', 'WhatsApp', 'Telegram', 'Tawk.To', ]; $additionalFeatureLimit = 99999999; $SocialLinkLimit = 99999999; $numberoffImages = 99999999; $can_listing_add = 1; } else { if ($vendorId) { $current_package = App\Http\Helpers\VendorPermissionHelper::packagePermission($vendorId); $dowgraded = App\Http\Helpers\VendorPermissionHelper::packagesDowngraded($vendor_id); $listingCanAdd = packageTotalListing($vendor_id) - vendorTotalListing($vendor_id); if (!empty($current_package) && !empty($current_package->features)) { $permissions = json_decode($current_package->features, true); } else { $permissions = null; } if ($current_package != '[]') { $numberoffImages = $current_package->number_of_images_per_listing; } else { $numberoffImages = 0; } } else { $permissions = null; $numberoffImages = 0; } } @endphp
@if ($vendorId != 0) @if ($current_package != '[]') @if (vendorTotalAddedListing($vendorId) >= $current_package->number_of_listing)
{{ __('You cannot add more listings for this vendor. Vendor will need to upgrade his plan') }}
@php $can_listing_add = 2; @endphp @else @php $can_listing_add = 1; @endphp @endif @else @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', '=', $vendor_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 to add Listing.') }}
@endif @php $can_listing_add = 0; @endphp @endif @endif
{{ __('Add Listing') }}
@if ($vendor_id != 0) @endif {{ __('Back') }}
    @csrf

    @csrf

    ...
    {{ __('Choose Image') }}

    {{ __('Image Size 600x400') }}

    @if (is_array($permissions) && in_array('Video', $permissions))

    @php $display = 'none'; @endphp
    ...
    {{ __('Choose Image') }}
    @endif
    @if (is_array($permissions) && in_array('Video', $permissions))
    @endif
    @php $approve = App\Models\BasicSettings\Basic::select('admin_approve_status')->first(); $status = $approve->admin_approve_status; @endphp

    {{ __('The Latitude must be between -90 and 90. Ex:49.43453') }}

    {{ __('The Longitude must be between -180 and 180. Ex:149.91553') }}

    @foreach ($languages as $language)
    @php $categories = App\Models\ListingCategory::where('language_id', $language->id) ->where('status', 1) ->get(); @endphp
    @php $Countries = App\Models\Location\Country::where('language_id', $language->id)->get(); $totalCountry = $Countries->count(); @endphp @if ($totalCountry > 0)
    @endif @php $States = App\Models\Location\State::where('language_id', $language->id)->get(); $totalState = $States->count(); @endphp @if ($totalState > 0)
    @endif @php $cities = App\Models\Location\City::where('language_id', $language->id)->get(); $totalCity = $cities->count(); @endphp
    @if (is_array($permissions) && in_array('Amenities', $permissions))
    @php $aminities = App\Models\Aminite::where('language_id', $language->id)->get(); @endphp
    @endif
    @php $currLang = $language; @endphp @foreach ($languages as $language) @continue($language->id == $currLang->id)
    @endforeach
    @endforeach
    @includeIf('admin.listing.check-limit') @endsection @section('script') @endsection