@extends('front::layouts.master') @section('title', $product_detail->title) @section('content')
@csrf

{{ $product_detail->title }} ACTIVE

{{ $product_detail->summary }}

@if($documents->count()) @foreach($documents as $document) @if($document->product_page_location == 'Data Sheet')

DATA SHEET.. {{$document->title}} PDF | HTML

@endif @endforeach @endif
Product details Technical documentation Design & development Ordering Support & training
@php // Calculate discounted price $originalPrice = $product_detail->price; $finalPrice = $originalPrice; $hasDiscount = false; $discountPercentage = 0; if ($product_detail->discount > 0) { $finalPrice = $originalPrice - ($originalPrice * $product_detail->discount / 100); $hasDiscount = true; $discountPercentage = $product_detail->discount; } elseif ($product_detail->special_price && $product_detail->special_price < $originalPrice) { $finalPrice = $product_detail->special_price; $hasDiscount = true; $discountPercentage = round((($originalPrice - $product_detail->special_price) / $originalPrice) * 100); } $allFields = [ ['Input Voltage Max (Volts)', $product_detail->input_voltage_max ? $product_detail->input_voltage_max . '' : 'N/A'], ['Input Voltage Min (Volts)', $product_detail->input_voltage_min ? $product_detail->input_voltage_min . '' : 'N/A'], ['Input Current Max (Volts)', $product_detail->input_current_max ? $product_detail->input_current_max . '' : 'N/A'], ['Output Voltage Max (Volts)', $product_detail->output_voltage_max ? $product_detail->output_voltage_max . '' : 'N/A'], ['Output Voltage Min (Volts)', $product_detail->output_voltage_min ? $product_detail->output_voltage_min . '' : 'N/A'], ['Output Current Max (Amps)', $product_detail->output_current_max ? $product_detail->output_current_max . '' : 'N/A'], ['Max Output Power (Watts)', $product_detail->max_output_power ? $product_detail->max_output_power . '' : 'N/A'], ['Max Temperature (C)', $product_detail->max_temperature ? $product_detail->max_temperature . '' : 'N/A'], ['Min Temperature (C)', $product_detail->min_temperature ? $product_detail->min_temperature . '' : 'N/A'], ['Product Dimension (LxWxH in mm)', $product_detail->product_dimension ? $product_detail->product_dimension . '' : 'N/A'], ['Part Number', $product_detail->part_number], ['Stock', $product_detail->stock], ['Status', ucfirst($product_detail->status)], ['Price', $hasDiscount ? $finalPrice : $originalPrice], // This will be handled specially below ['Original Price', $originalPrice], ['Discount', $discountPercentage > 0 ? $discountPercentage . '%' : 'No Discount'], ['Brand', $product_detail->brand?->title ?? 'N/A'], ['SKU', $product_detail->sku ?? 'N/A'], ]; $visibleCount = 14; @endphp @foreach($allFields as $index => $field) @if($field[0] == 'Price') @elseif($field[0] == 'Original Price' || $field[0] == 'Discount') @else @endif @endforeach
Price @if($hasDiscount) ${{ number_format($finalPrice, 2) }} ${{ number_format($originalPrice, 2) }} @if($discountPercentage > 0) {{ $discountPercentage }}% OFF @endif @else ${{ number_format($originalPrice, 2) }} @endif
{{ $field[0] }} {{ $field[1] }}
View All ▼
{{ $product_detail->title }}
@if($product_detail->getFirstMediaUrl('videos'))
@endif

Date
{{-- DOCUMENT ROWS --}}
@if($documents->count()) @foreach($documents as $document) @if($document->file_type == 'Technical Documentation')
{{ $document->type }}
{{ $document->title }}
{{ $document->created_at->format('d M Y') }}
@endif @endforeach @else
No documents available
@endif
@if($documents->count()) @foreach($documents as $document) @if($document->file_type == 'Tools')
{{ $document->file }}
Download
@elseif($document->file_type == 'Software')
{{ $document->file }}
Download
@elseif($document->file_type == 'Misc')
{{ $document->file }}
Download
@endif @endforeach @else
No documents available
@endif
Ordering
Part Number
Purchase
Inventory
Price
Status
{{$product_detail->part_number}}
@guest @endguest @auth
@csrf

Orders are typically
processed within 2–3
business days.

@endauth
{{$product_detail->stock}}
@if($hasDiscount) ${{ number_format($finalPrice, 2) }}
${{ number_format($originalPrice, 2) }} @else ${{ number_format($originalPrice, 2) }} @endif
{{ucfirst($product_detail->status)}}
Sales support
Technical support
Feedback

Locations

Executive office: {{ $settings->address ?? 'Dallas TX 75238' }}

Email: {{ $settings->email ?? 'contact@aatral.com' }}

@endsection