@extends('apps::frontend.layouts.master') @section('title', __('apps::frontend.products.details.title')) @section('meta_description', $product->seo_description ?? '') @section('meta_keywords', $product->seo_keywords ?? '') @section('externalStyle') @endsection @section('content')
@if ($product->image) img @endif @foreach ($product->images as $k => $img) img @endforeach @foreach ($product->variants as $k => $varPrd) img @endforeach

{{ $product->title }}

@if ($product->tags) @foreach ($product->tags as $i => $tag) {{ $tag->title }} @endforeach @endif {{--
15 مراجعة
--}}
@if (auth()->check() && !in_array( $product->id, array_column( auth()->user()->favourites->toArray(), 'id', ), ))
@csrf
@endif
@if ($product->description)

{!! $product->description !!}

@endif
{{--
{{ __('catalog::frontend.products.product_variations') }}
--}} @foreach ($product->options as $k => $opt)

{{ $opt->option->title }}

@endforeach
{{--
{{ __('catalog::frontend.products.product_information') }}
--}}
@if (!is_null($variantPrd))

{{ __('catalog::frontend.products.sku') }} {{ $variantPrd->sku }}

@else

{{ __('catalog::frontend.products.sku') }} {{ $product->sku }}

@endif
{{--

{{ __('catalog::frontend.products.vendor') }} {{ $product->vendor->title }}

--}}
@if (!is_null($variantPrd)) @if ($variantPrd->qty <= 3)

{{ __('catalog::frontend.products.remaining_qty') }} {{ $variantPrd->qty }}

@endif @else @if ($product->qty <= 3)

{{ __('catalog::frontend.products.remaining_qty') }} {{ $product->qty }}

@endif @endif
@if (!is_null($variantPrd)) @if ($variantPrd->offer) {{ $variantPrd->price }} {{ __('apps::frontend.master.kwd') }} {{ $variantPrd->offer->offer_price }} {{ __('apps::frontend.master.kwd') }} @else {{ $variantPrd->price }} {{ __('apps::frontend.master.kwd') }} @endif @else @if ($product->offer) @if (!is_null($product->offer->offer_price)) {{ $product->price }} {{ __('apps::frontend.master.kwd') }} {{ $product->offer->offer_price }} {{ __('apps::frontend.master.kwd') }} @else {{ $product->price }} {{ __('apps::frontend.master.kwd') }} / {{ $product->offer->percentage . ' %' }} {{ __('apps::frontend.master.discount') }} {{-- {{ calculateOfferAmountByPercentage($product->price, $product->offer->percentage) }} {{ __('apps::frontend.master.kwd') }} --}} @endif @else {{ $product->price }} {{ __('apps::frontend.master.kwd') }} @endif @endif
@if (count($product->addOns) > 0) @foreach ($product->addOns as $k => $addOn) @if ($addOn->type == 'multi')

{{ $addOn->addonCategory->getTranslation('title', locale()) }}

@if (count($addOn->addonOptions) > 0) @foreach ($addOn->addonOptions as $k => $addOnOption)
id)) {{ selectedCartAddonsOption($product, $addOn->addonCategory->id, $addOnOption->addonOption->id) }} @else {{ $addOnOption->default == 1 ? 'checked' : '' }} @endif>
@if (floatval($addOnOption->addonOption->price) > 0)

{{ number_format($addOnOption->addonOption->price, 3) }} {{ __('apps::frontend.master.kwd') }}

@endif
@endforeach @endif
@else

{{ $addOn->addonCategory->getTranslation('title', locale()) }}

@if (count($addOn->addonOptions) > 0) @foreach ($addOn->addonOptions as $k => $addOnOption)
id)) {{ selectedCartAddonsOption($product, $addOn->addonCategory->id, $addOnOption->addonOption->id) }} @else {{ $addOnOption->default == 1 ? 'checked' : '' }} @endif>
@if (floatval($addOnOption->addonOption->price) > 0)

{{ number_format($addOnOption->addonOption->price, 3) }} {{ __('apps::frontend.master.kwd') }}

@endif
@endforeach @endif
@endif @endforeach @endif
@if (is_null($product->variants) || count($product->variants) == 0)
@csrf
{{ __('catalog::frontend.products.quantity') }}
@elseif(!is_null($variantPrd))
@csrf
{{ __('catalog::frontend.products.quantity') }}
@endif
{{-- --}} @if (count($related_products) > 0)

{{ __('catalog::frontend.products.related_products') }}

@endif
@endsection @section('externalJs') @endsection