@extends('layouts.page') @section('head') @include('elements.seo', [ 'title'=>$product->name, 'description'=> $product->sort_description ]) @endsection @section('content')
@if($product->images->first()) {{ $product->name }} @endif
    @foreach ($product->images as $image)
  • {{ $product->name }}
  • @endforeach
@csrf
{{$product->name}} @php $inventoryEnabled = \App\Models\Setting::getByKey('inventory_enabled'); $showInventory = ($inventoryEnabled === '1' || $inventoryEnabled === 1 || $inventoryEnabled === true); $available = auth()->check() ? $product->getInventoryForBodega($bodegaCode ?? null) : $product->getInventoryForMdtat(); $invForTag = $product->inventories->firstWhere('bodega_code', (auth()->check() ? ($bodegaCode ?? null) : 'MDTAT')); $reserved = (int) ($invForTag?->reserved ?? 0); @endphp @if($showInventory && ($available - $reserved) < 10 && ($available - $reserved) > 0) últimas unidades disponibles @endif
@if($product->sku)

{{$product->sku}}

@endif @auth @if($showInventory && $available <= 0)

Producto no disponible para tu ubicación

@else @if($showInventory)

Inventario: {{ $available }}

Inventario (MDTAT): {{ $available }}

@endif @endif @else

Inventario (MDTAT): {{ $available }}

@endauth
${{ currency($product->final_price['price']) }} @if($product->final_price['has_discount']) ${{ currency($product->final_price['old']) }} @endif
@if($product->final_price['perItemPrice'])

(Und. x) ${{ currency($product->final_price['perItemPrice']) }}

@endif @if($product->brand)

{{$product->brand->name}}

@endif @if($product->category)

{{$product->category->name}}

@endif
@if ($product->variation && $product->items->count()) {{ $product->variation->name }}: @endif

@php $hasDetails = $product->description || $product->technical_specifications || $product->warranty || $product->other_information; @endphp @if($hasDetails)

Detalles del producto

@endif
@if($related->count())

Complementa tu compra

@endif @if(count($intermedio) > 0 || count($lateral) > 0)
@if(count($intermedio) > 0)
    @foreach ($intermedio as $banner)
  • @endforeach
@endif @if(count($lateral) > 0)
    @foreach ($lateral as $banner)
  • @endforeach
@endif
@endif
@endsection @section('scripts') @endsection