@extends('app') @section('title', (app()->getLocale() === 'en' && $product->name_en ? $product->name_en : $product->name).' – Verve') @push('styles') @endpush @section('content') @if(session('error'))
{{ session('error') }}
@endif
{{ app()->getLocale() === 'en' && $product->name_en ? $product->name_en : $product->name }}

{{ app()->getLocale() === 'en' && $product->name_en ? $product->name_en : $product->name }}

{{ number_format($product->price/100, 2) }} PLN (≈ {{ number_format(($product->price/100) / 4.3, 2) }} EUR)

{{ $product->getTranslatedDescription() }}

{{-- DEBUG --}} @if(config('app.debug'))
DEBUG:
Slug: {{ $product->slug }}
Translation key: products.{{ $product->slug }}
Has value: {{ strlen($product->getTranslatedDescription()) > 0 ? 'YES' : 'NO' }}
Value length: {{ strlen($product->getTranslatedDescription()) }}
Raw: {{ __('products.' . $product->slug) }}
@endif @php $sections = is_array($product->description_sections) ? $product->description_sections : (is_string($product->description_sections) ? json_decode($product->description_sections, true) : []); @endphp @if($sections && count($sections) > 0)
@foreach($sections as $section)

{{ $section['title'] }}

{{ $section['content'] }}

@endforeach
@endif
@csrf
@php $gallery = is_array($product->gallery) ? $product->gallery : (is_string($product->gallery) ? json_decode($product->gallery, true) : []); @endphp @if($gallery && count($gallery) > 0) @endif
@endsection @push('scripts') @endpush