@php use App\Enums\Product\ProductVarificationStatusEnum;use Illuminate\Support\Str; @endphp @extends('layouts.admin.app', ['page' => $menuAdmin['products']['active'] ?? "", 'sub_page' => $menuAdmin['products']['route']['products']['sub_active']]) @section('title', __('labels.product_details')) @section('header_data') @php $page_title = __('labels.product_details'); $page_pretitle = __('labels.admin') . " " . __('labels.product_details'); @endphp @endsection @php $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('admin.dashboard')], ['title' => __('labels.products'), 'url' => route('admin.products.index')], ['title' => __('labels.product_details'), 'url' => ''] ]; @endphp @section('admin-content')

{{ __('labels.product_summary') }}

{{ __('labels.product_name') }}
{{ $product->title }}
{{ __('labels.product_type') }}
{{ $product->type }}
{{ __('labels.sold_by') }}
{{ $product->seller->user->name ?? "" }}
@if(!empty($product->taxClasses) && $product->taxClasses->count() > 0)
{{ __('labels.tax_rate') }}
{{ $product->taxClasses->pluck('title')->implode(', ')}}
@endif
{{ __('labels.status') }}
{{ $product->status }}
{{ __('labels.verification_status') }}
@php $vs = $product->verification_status; @endphp {{ $vs }}
{{ __('labels.category') }}
{{ $product->category->title ?? 'N/A' }}
{{ __('labels.brand') }}
{{ $product->brand->title ?? 'N/A' }}
{{ __('labels.created_at') }}
{{ $product->created_at }}
{{ __('labels.updated_at') }}
{{ $product->updated_at }}

{{ __('labels.product_specifications') }}

{{ __('labels.is_cancelable') }}
{{ $product->is_cancelable ? __('labels.yes') : __('labels.no') }}
@if($product->is_cancelable)
{{ __('labels.cancelable_till') }}
{{ Str::replace("_" , " ", $product->cancelable_till) }}
@endif
{{ __('labels.is_returnable') }}
{{ $product->is_returnable ? __('labels.yes') : __('labels.no') }}
@if($product->is_returnable && $product->returnable_days)
{{ __('labels.returnable_days') }}
{{ $product->returnable_days }} {{ __('labels.days') }}
@endif @if($product->warranty_period)
{{ __('labels.warranty_period') }}
{{ $product->warranty_period }} {{ __('labels.days') }}
@endif @if($product->guarantee_period)
{{ __('labels.guarantee_period') }}
{{ $product->guarantee_period }} {{ __('labels.days') }}
@endif @if($product->made_in)
{{ __('labels.made_in') }}
{{ $product->made_in }}
@endif @if($product->hsn_code)
{{ __('labels.hsn_code') }}
{{ $product->hsn_code }}
@endif @if($product->minimum_order_quantity)
{{ __('labels.minimum_order_quantity') }}
{{ $product->minimum_order_quantity }}
@endif @if($product->quantity_step_size)
{{ __('labels.quantity_step_size') }}
{{ $product->quantity_step_size }}
@endif @if($product->total_allowed_quantity)
{{ __('labels.total_allowed_quantity') }}
{{ $product->total_allowed_quantity }}
@endif
{{ __('labels.is_inclusive_tax') }}
{{ $product->is_inclusive_tax ? __('labels.yes') : __('labels.no') }}
{{ __('labels.is_attachment_required') }}
{{ $product->is_attachment_required ? __('labels.yes') : __('labels.no') }}
@if($product->base_prep_time)
{{ __('labels.base_prep_time') }}
{{ $product->base_prep_time }} {{ __('labels.minutes') }}
@endif
{{ __('labels.requires_otp') }}
{{ $product->requires_otp ? __('labels.yes') : __('labels.no') }}
@if($product->video_type && $product->video_link)
{{ __('labels.video_type') }}
{{ $product->video_type }}
{{ __('labels.video_link') }}
@endif @if(!empty($product->tags) && count($product->tags) > 0)
{{ __('labels.tags') }}
{{ implode(', ', $product->tags) }}
@endif
@if($updateStatusPermission ?? false)

Admin Approval

@csrf
@endif

{{ __('labels.product_image') }}

@if($product->additional_images && count($product->additional_images) > 0)

{{ __('labels.additional_images') }}

@foreach($product->additional_images as $image) @endforeach
@endif
@php $customFields = is_array($product->custom_fields ?? null) ? $product->custom_fields : []; @endphp @if(!empty($customFields))

{{ __('labels.custom_fields') ?? 'Custom Fields' }}

@foreach($customFields as $cfKey => $cfValue)
{{ Str::of($cfKey)->replace('_',' ')->toString() }}
{{ is_array($cfValue) ? implode(', ', $cfValue) : $cfValue }}
@endforeach
@endif

{{ __('labels.product_description') }}

{!! $product->description !!}
@if(isset($storeVariantPricing) && count($storeVariantPricing) > 0)

{{ __('labels.store_wise_pricing') }}

@foreach($storeVariantPricing as $variantId => $variantData)

{{ ($product->type === "variant" ? __('labels.variant_name') : __('labels.product_name')) . " : " . $variantData['title'] }}

@if(count($variantData['attributes']) > 0)
{{ __('labels.attributes') }}: @php $attributeTexts = []; foreach($variantData['attributes'] as $attr) { $attributeTexts[] = $attr['attribute_name'] . ': ' . $attr['attribute_value']; } echo implode(', ', $attributeTexts); @endphp
@endif @if(count($variantData['store_pricing']) > 0)
@foreach($variantData['store_pricing'] as $storePricing) @endforeach
{{ __('labels.store') }} {{ __('labels.sku') }} {{ __('labels.price') }} {{ __('labels.special_price') }} {{ __('labels.cost') }} {{ __('labels.stock') }}
{{ $storePricing['store_name'] }} {{ $storePricing['sku'] }} {{ $systemSettings['currencySymbol'] . number_format($storePricing['price'], 2) }} {{ $storePricing['special_price'] ? $systemSettings['currencySymbol'] . number_format($storePricing['special_price'], 2) : 'N/A' }} {{ $storePricing['cost'] ? $systemSettings['currencySymbol'] . number_format($storePricing['cost'], 2) : 'N/A' }} {{ $storePricing['stock'] }}
@else

{{ __('labels.no_store_pricing_available') }}

@endif
@if(!$loop->last)
@endif @endforeach
@endif @if($product->faqs->count() > 0)

{{ __('labels.product_faqs') }}

@foreach($product->faqs as $index => $faq)

{{ $faq->answer }}
@endforeach
@endif
@endsection @push('scripts') @endpush