@extends('layouts.app') @section('title', 'TemTechnik | ' . $product->getTranslation('name', app()->getLocale()) . ' - ' . __('general.page_title_product_detail')) @section('content')
{{ $product->name }} @if($product->images->count() > 1) @endif
@if($product->images->count() > 1)
@foreach($product->images as $img) {{ $product->name }} thumbnail @endforeach
@endif

{{ $product->getTranslation('name', app()->getLocale()) }}

@php $currency = session('currency', 'AZN'); $price = $product->getPriceInCurrency($currency); $finalPrice = $product->getFinalPriceInCurrency($currency); $symbol = $product->getCurrencySymbol($currency); @endphp

@if($product->isDiscounted()) {{ $symbol }}{{ number_format($price, 2) }} {{ $symbol }}{{ number_format($finalPrice, 2) }} @else {{ $symbol }}{{ number_format($price, 2) }} @endif

@if($product->category) @endif

{{ __('general.description') }}

@if($product->getTranslation('description', app()->getLocale()))

{!! nl2br(e($product->getTranslation('description', app()->getLocale()))) !!}

@else

{{ __('general.no_description') }}

@endif
@if($product->inStock())

{{ __('general.in_stock') }} ({{ $product->stock_quantity }} {{ __('general.available') }})

@else

{{ __('general.out_of_stock') }}

@endif
@if($product->inStock())
@csrf
@auth @if(!Auth::user()->isAdmin()) @endif @endauth
@endif
@if($relatedProducts->count() > 0)

{{ __('general.related_products') }}

@foreach($relatedProducts as $relatedProduct) @endforeach
@endif @push('head') @endpush @push('scripts') @endpush @endsection