@extends ('layouts.front-layout') @section('content')
Consultation
Treatments
Delivery
Payment

Choose your preferred treatment

{{--
--}} {{-- @forelse($products as $product)--}} {{--
--}} {{--

{{ $product->product_name }}

--}} {{--

{{ $product->product_full_name }}

--}} {{--
--}} {{-- Most Popular--}} {{-- Cost-Effective--}} {{-- Equivalent To Viagra--}} {{--
--}} {{-- --}} {{--

About this treatment:

--}} {{-- {!! $product->product_detail_page_short_description !!}--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- 4.8/5--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--

Based on 27,133 reviews

--}} {{-- {{ $product->product_name }}--}} {{--
--}} {{--
--}} {{--
--}} {{--

Which strength is best for me?

--}} {{--
--}} {{-- --}}{{-- Strength Buttons --}} {{--
--}} {{--
--}} {{-- @foreach($product->groupedQuantities as $strength => $quantities)--}} {{-- @php--}} {{-- $variation = $quantities->first()->productVariation;--}} {{-- $isAvailable = $variation && $variation->variation_qty > 0;--}} {{-- @endphp--}} {{-- @if($isAvailable)--}} {{-- --}} {{-- @endif--}} {{-- @endforeach--}} {{--
--}} {{--
--}} {{-- --}}{{-- Price Groups --}} {{-- @foreach($product->groupedQuantities as $strength => $quantities)--}} {{-- @php--}} {{-- $variation = $quantities->first()->productVariation;--}} {{-- $isAvailable = $variation && $variation->variation_qty > 0;--}} {{-- @endphp--}} {{-- @if($isAvailable)--}} {{--
--}} {{--
{{ $strength }}
--}} {{-- @foreach($quantities->unique('quantity_id') as $qa)--}} {{-- @php--}} {{-- $quantity = $qa->quantity;--}} {{-- $variation = $qa->productVariation;--}} {{-- $packPrice = (float) ($variation->variation_unit_price ?? 0);--}} {{-- $tabletsInPack = (int) ($variation->variation_qty ?? 1);--}} {{-- $selectedTabletCount = (int) ($quantity->quantity_number ?? 1);--}} {{-- // ✅ Safe division (avoid divide by zero)--}} {{-- $perTabletPrice = ($tabletsInPack > 0) ? ($packPrice / $tabletsInPack) : 0;--}} {{-- $totalPrice = $perTabletPrice * $selectedTabletCount;--}} {{-- @endphp--}} {{-- --}}{{-- Agar variation_qty > 0 to hi quantity row dikhao --}} {{-- @if($variation->variation_qty > 0)--}} {{--
--}} {{--
--}} {{-- first ? 'checked' : '' }}--}} {{-- >--}} {{-- --}} {{--
--}} {{--
--}} {{-- Per Unit £{{ number_format($perTabletPrice, 2) }}--}} {{--
--}} {{--
--}} {{-- Total £{{ number_format($totalPrice, 2) }}--}} {{--
--}} {{--
--}} {{-- @endif--}} {{-- @endforeach--}} {{--
--}} {{-- @endif--}} {{-- @endforeach--}} {{-- @php--}} {{-- $hasAvailableVariation = false;--}} {{-- // Check if product has at least one variation with qty > 0--}} {{-- foreach ($product->groupedQuantities as $group) {--}} {{-- foreach ($group as $qa) {--}} {{-- if ($qa->productVariation && $qa->productVariation->variation_qty > 0) {--}} {{-- $hasAvailableVariation = true;--}} {{-- break 2;--}} {{-- }--}} {{-- }--}} {{-- }--}} {{-- @endphp--}} {{-- @if($hasAvailableVariation)--}} {{--
--}} {{-- --}} {{-- Buy Now --}} {{-- --}} {{--
--}} {{-- @else--}} {{--
--}} {{-- --}} {{--
--}} {{-- @endif--}} {{--
--}} {{--
--}} {{-- @empty--}} {{--

No products found.

--}} {{-- @endforelse--}} {{--
--}} {{--
--}} {{-- @forelse($products as $product)--}} {{--
--}} {{--

{{ $product->product_name }}

--}} {{--

{{ $product->product_full_name }}

--}} {{--
--}} {{-- Most Popular--}} {{-- Cost-Effective--}} {{-- Equivalent To Viagra--}} {{--
--}} {{-- --}} {{--

About this treatment:

--}} {{-- {!! $product->product_detail_page_short_description !!}--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- 4.8/5--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--

Based on 27,133 reviews

--}} {{-- {{ $product->product_name }}--}} {{--
--}} {{--
--}} {{--
--}} {{--

Which strength / brand is best for me?

--}} {{--
--}} {{-- --}}{{-- Strength or Brand Buttons --}} {{--
--}} {{--
--}} {{-- @foreach($product->groupedQuantities as $label => $quantities)--}} {{-- @php--}} {{-- $qaSample = $quantities->first();--}} {{-- $variation = $qaSample->productVariation;--}} {{-- $brand = $qaSample->brand;--}} {{-- $isAvailable = ($variation && $variation->variation_qty > 0) || $brand;--}} {{-- @endphp--}} {{-- @if($isAvailable)--}} {{-- --}} {{-- @endif--}} {{-- @endforeach--}} {{--
--}} {{--
--}} {{-- --}}{{-- Price Groups --}} {{-- @foreach($product->groupedQuantities as $label => $quantities)--}} {{-- @php--}} {{-- $qaSample = $quantities->first();--}} {{-- $variation = $qaSample->productVariation;--}} {{-- $brand = $qaSample->brand;--}} {{-- $isAvailable = ($variation && $variation->variation_qty > 0) || $brand;--}} {{-- @endphp--}} {{-- @if($isAvailable)--}} {{--
--}} {{--
{{ $label }}
--}} {{-- @foreach($quantities->unique('quantity_id') as $qa)--}} {{-- @php--}} {{-- $quantity = $qa->quantity;--}} {{-- $variation = $qa->productVariation;--}} {{-- $brand = $qa->brand;--}} {{-- $packPrice = (float) ($variation->variation_unit_price ?? 0);--}} {{-- $tabletsInPack = (int) ($variation->variation_qty ?? 1);--}} {{-- $selectedTabletCount = (int) ($quantity->quantity_number ?? 1);--}} {{-- $perTabletPrice = ($tabletsInPack > 0) ? ($packPrice / $tabletsInPack) : 0;--}} {{-- $totalPrice = $perTabletPrice * $selectedTabletCount;--}} {{-- @endphp--}} {{-- @if(($variation && $variation->variation_qty > 0) || $brand)--}} {{--
--}} {{--
--}} {{-- first ? 'checked' : '' }}--}} {{-- >--}} {{-- --}} {{--
--}} {{--
--}} {{-- £{{ number_format($perTabletPrice, 2) }} per unit--}} {{--
--}} {{--
--}} {{-- Total £{{ number_format($totalPrice, 2) }}--}} {{--
--}} {{--
--}} {{-- @endif--}} {{-- @endforeach--}} {{--
--}} {{-- @endif--}} {{-- @endforeach--}} {{-- --}}{{-- Buy Now / Out of Stock --}} {{-- @php--}} {{-- $hasAvailable = false;--}} {{-- foreach ($product->groupedQuantities as $group) {--}} {{-- foreach ($group as $qa) {--}} {{-- if ($qa->productVariation || $qa->brand) {--}} {{-- $hasAvailable = true;--}} {{-- break 2;--}} {{-- }--}} {{-- }--}} {{-- }--}} {{-- @endphp--}} {{-- @if($hasAvailable)--}} {{--
--}} {{-- --}} {{-- Buy Now--}} {{-- --}} {{--
--}} {{-- @else--}} {{--
--}} {{-- --}} {{--
--}} {{-- @endif--}} {{--
--}} {{--
--}} {{-- @empty--}} {{--

No products found.

--}} {{-- @endforelse--}} {{--
--}}
@forelse($products as $product) {{-- Product Info --}}

{{ $product->product_name }}

{{ $product->product_full_name }}

Most Popular Cost-Effective Equivalent To Viagra

About this treatment:

{!! $product->product_detail_page_short_description !!}
{{-- Product Image & Rating --}}
4.8/5

Based on 27,133 reviews

{{ $product->product_name }}
{{-- Strength / Brand Options --}}
{{-- Top Buttons --}}
@foreach($product->groupedQuantities as $label => $quantities) @php $qaSample = $quantities->first(); $variation = $qaSample->productVariation; $brandOption = $qaSample->brandOption; $isAvailable = ($variation && $variation->variation_qty > 0) || $brandOption; @endphp @if($isAvailable) @endif @endforeach
{{-- Price Groups --}} @foreach($product->groupedQuantities as $label => $quantities) @php $qaSample = $quantities->first(); $variation = $qaSample->productVariation; $brandOption = $qaSample->brandOption; $isAvailable = ($variation && $variation->variation_qty > 0) || $brandOption; @endphp @if($isAvailable)
{{ $label }}
@foreach($quantities as $qa) @php $quantity = $qa->quantity; $variation = $qa->productVariation; $brandOption = $qa->brandOption; @endphp {{-- Variation Price --}} @if($variation) @php $packPrice = (float) ($variation->variation_unit_price ?? 0); $tabletsInPack = (int) ($variation->variation_qty ?? 1); $selectedTabletCount = (int) ($quantity->quantity_number ?? 1); $perTabletPrice = $packPrice / $tabletsInPack; $totalPrice = $perTabletPrice * $selectedTabletCount; @endphp
first ? 'checked' : '' }}>
£{{ number_format($perTabletPrice,2) }} per unit
Total £{{ number_format($totalPrice,2) }}
{{-- Brand Option Price --}} @elseif($brandOption) @php $packPrice = (float) ($brandOption->brand_option_per_price ?? 0); $tabletsInPack = 1; $selectedTabletCount = (int) ($quantity->quantity_number ?? 1); $perTabletPrice = $packPrice / $tabletsInPack; $totalPrice = $perTabletPrice * $selectedTabletCount; @endphp
first ? 'checked' : '' }}>
£{{ number_format($perTabletPrice,2) }} per unit
Total £{{ number_format($totalPrice,2) }}
@endif @endforeach
@endif @endforeach {{-- Buy Now / Out of Stock --}} @php $hasAvailable = false; foreach ($product->groupedQuantities as $group) { foreach ($group as $qa) { if ($qa->productVariation || $qa->brandOption) { $hasAvailable = true; break 2; } } } @endphp @if($hasAvailable) @else
@endif
@empty

No products found.

@endforelse
@endsection @section('script') {{-- --}} {{----}} {{----}} @endsection