@extends('layouts.app') @section('title', $product->name) @section('content')

{{ $product->name }}

Düzenle
@php $costPrice = $product->costPrice(); $minMarginPercent = $product->minProfitMarginPercent(); $requiredMinPrice = $product->requiredMinSalePrice(); $activePrice = $product->currentSalePrice(); $actualMarginPercent = $product->actualProfitMarginPercent(); $isMarginInsufficient = $product->isMarginBelowMinimum(); @endphp
SKU
{{ $product->sku ?? '-' }}
Fiyat
@if($product->sale_price) {{ number_format($product->sale_price, 2) }} ₺ {{ number_format($product->regular_price ?? 0, 2) }} ₺ @else {{ number_format($product->regular_price ?? 0, 2) }} ₺ @endif
Maliyet Fiyatı
@if($costPrice !== null) {{ number_format((float) $costPrice, 2) }} ₺ @else Belirtilmemiş @endif
Minimum Kâr Marjı
{{ $minMarginPercent !== null ? number_format((float) $minMarginPercent, 2) : number_format(15, 2) }} % @if($requiredMinPrice !== null) (Gerekli min. fiyat: {{ number_format((float) $requiredMinPrice, 2) }} ₺) @endif
Gerçekleşen Marj
@if($actualMarginPercent !== null) {{ number_format((float) $actualMarginPercent, 2) }} % @if($isMarginInsufficient) Minimum marj altında @else Marj uygun @endif @else Hesaplanamadı (maliyet veya fiyat eksik) @endif
Kategoriler
{{ $product->categories ?? '-' }}
Görsel Sayısı
{{ $product->media()->count() }}
@if($product->short_description)
Kısa Açıklama
{{ $product->short_description }}
@endif @if($product->description)
Uzun Açıklama
{{ $product->description }}
@endif @if($product->product_link) @endif

Ürün Görselleri ({{ $product->media->count() }})

@if($product->is_master || !$product->site_id)
@endif
@if($product->media->count() > 0)
@foreach($product->media as $media)
@if($media->master_image_full_url) Görsel {{ $media->sort_order }}

Görsel #{{ $media->sort_order }}

{{ $media->master_image_url }}

@else

Görsel yolu yok

@endif
@endforeach
@else

Bu ürün için henüz görsel eklenmemiş.

@endif
@if($relatedProducts->count() > 0)

İlişkili Ürünler ({{ $relatedProducts->count() }})

@foreach($relatedProducts as $related)
{{ $related->name }}

Site: {{ $related->site ? $related->site->name : 'Master' }} @if($related->sku) | SKU: {{ $related->sku }} @endif

@endforeach
@endif
@endsection