@props(['product', 'bodegaCode' => null]) @php $inventoryEnabled = \App\Models\Setting::getByKey('inventory_enabled'); $showInventory = ($inventoryEnabled === '1' || $inventoryEnabled === 1 || $inventoryEnabled === true); $vacationInfo = \App\Models\Setting::getVacationModeInfo(); $isVacationMode = $vacationInfo['active']; $formattedVacationDate = $vacationInfo['formatted_date'] ?? 'pronto'; @endphp
@if($product->images->first()) @else @endif
{{$product->name}} @if($product->sku)

{{$product->sku}}

@endif @auth @php $isManaged = $product->isInventoryManaged(); // Use orderable stock (available - safety) for client-facing display $orderableStock = $product->getOrderableStockForBodega($bodegaCode); @endphp @if($showInventory && $isManaged) @if($orderableStock <= 0)

Producto no disponible para tu ubicación

@else

Inventario: {{ $orderableStock }}

@endif @endif @else @php $isManaged = $product->isInventoryManaged(); // Use orderable stock (available - safety) for client-facing display $orderableStock = $product->getOrderableStockForMdtat(); @endphp @if($showInventory && $isManaged) @if($orderableStock <= 0)

Producto no disponible para tu ubicación

@else

Inventario: {{ $orderableStock }}

@endif @endif @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
@csrf @if($product->variation_id) @php $firstVariation = $product->items->first(); @endphp @if($firstVariation) @endif @endif