{{-- Fonts & Icons --}} {{-- Bootstrap & Owl Carousel CSS --}} @php $information = \App\Models\Information::first(); // Theme Colors $primaryColor = $ln_pg->theme_primary_col ?? '#d35400'; $darkBg = '#2c1e16'; $lightBg = '#fdfbf7'; $productId = $product->id ?? 0; $productName = $product->name ?? ''; $contentCategory = $product?->category?->name ?? 'Landing Page'; $sslActive = $information->ssl_active ?? 0; $pixelId = setting('fb_pixel_id') ?? null; $phoneNumber = $ln_pg->phone ?? ''; // ✅ Global Settings for Weight Based Charge $globalSetting = DB::table('delivery_charges')->first(); $isWeightBased = $globalSetting && $globalSetting->charge_type == 'weight_based'; // ✅ Dropdown Variation Logic Setup $variations = collect(); if($product){ try{ $product->loadMissing(['variations.size','variations.color', 'variations.stocks']); $variations = $product->variations ?? collect(); }catch(\Throwable $e){ $variations = $product->variations ?? collect(); } } $defaultVar = $variations->first(); $defaultVarId = $defaultVar->id ?? null; // ✅ Price Formatting $defaultPrice = 0; $regularStrikePrice = 0; if (isset($product->after_discount) && $product->after_discount > 0) { $defaultPrice = intval($product->after_discount); $regularStrikePrice = intval($product->sell_price); } elseif (isset($product->sell_price) && $product->sell_price > 0) { $defaultPrice = intval($product->sell_price); $regularStrikePrice = ($product->price > $product->sell_price) ? intval($product->price) : 0; } else { $defaultPrice = intval($product->price ?? 0); } // ✅ Default Stock Logic $defaultStock = $defaultVar ? $defaultVar->stocks->sum('quantity') : ($product->stock_quantity ?? 0); // ✅ FIXED: Missing varMatrix Initialization $sizes = collect(); $colors = collect(); $varMatrix = []; if($variations->count() > 0) { foreach($variations as $v) { if($v->size) $sizes->push($v->size); if($v->color) $colors->push($v->color); $vPrice = (isset($v->after_discount_price) && $v->after_discount_price > 0) ? intval($v->after_discount_price) : intval($v->price ?? $defaultPrice); $sId = $v->size_id ?? 0; $cId = $v->color_id ?? 0; $varMatrix["{$sId}_{$cId}"] = [ 'variation_id' => $v->id, 'price' => $vPrice, 'stock' => 999999 ]; } $sizes = $sizes->unique('id')->values(); $colors = $colors->unique('id')->values(); } $rawSliderImages = collect($ln_pg->images ? $ln_pg->images->all() : []); $sliderImages = $rawSliderImages; if($rawSliderImages->count() > 0 && $rawSliderImages->count() < 4) { $sliderImages = $rawSliderImages->merge($rawSliderImages)->merge($rawSliderImages); } $reviewImages = collect($ln_pg->review_images ? $ln_pg->review_images->all() : []); $bgImage = $ln_pg->landing_bg ? asset('landing_pages/'.$ln_pg->landing_bg) : asset('frontend/images/default-bg.jpg'); @endphp {{-- ✅✅✅ UPDATED PIXEL SCRIPTS (DUPLICATE ISSUE FIXED & GTM DATALAYER INCLUDED) ✅✅✅ --}} @if(!empty(optional($information)->tracking_code)) {!! $information->tracking_code !!} @endif @if(!empty($pixelId)) @endif {{-- ✅ ১. পেজ লোড ট্র্যাকিং (view_content) - Added here ✅ --}}
{{-- 1. FULL SCREEN HERO SECTION WITH BLUR AND CENTERED CARD --}}
@if(!empty($ln_pg->title1))

{{ $ln_pg->title1 }}

@endif @if(!empty($ln_pg->left_side_title))

{{ $ln_pg->left_side_title }}

@endif
{{ $ln_pg->countdown_title ?? 'অফারটি শেষ হতে আর বাকি মাত্র' }}
05ঘণ্টা
00মিনিট
00সেকেন্ড
@if($regularStrikePrice > 0) {{ $ln_pg->old_price_text ?? 'পূর্বের মূল্যঃ' }} {{ $regularStrikePrice }} ৳ @endif {{ $ln_pg->new_price_text ?? 'বর্তমান মূল্যঃ' }} {{ $defaultPrice }} ৳
{{-- 2. SEPARATE DESCRIPTION CARD --}} @if(!empty($ln_pg->left_side_desc))
{!! $ln_pg->left_side_desc !!}
@endif {{-- 3. PROMISE SECTION (LEFT IMAGE, RIGHT LIST) --}} @if(!empty($ln_pg->promise_title))
{{ $ln_pg->promise_badge ?? 'কেন আমাদের প্রোডাক্ট সেরা?' }}

{{ $ln_pg->promise_title ?? 'আমাদের প্রতিশ্রুতি' }}

@if($ln_pg->right_product_image) Product @else Product @endif
{{ $ln_pg->promise_img_badge ?? '১০০% খাঁটি' }}
{{-- Promise 1 --}} @if(!empty($ln_pg->promise_1_title))
{{ $ln_pg->promise_1_title }}

{{ $ln_pg->promise_1_desc }}

@endif {{-- Promise 2 --}} @if(!empty($ln_pg->promise_2_title))
{{ $ln_pg->promise_2_title }}

{{ $ln_pg->promise_2_desc }}

@endif {{-- Promise 3 --}} @if(!empty($ln_pg->promise_3_title))
{{ $ln_pg->promise_3_title }}

{{ $ln_pg->promise_3_desc }}

@endif {{-- Negative Points --}} @if(!empty($ln_pg->negative_tags))
{{ $ln_pg->negative_title ?: 'আমাদের পণ্যে যা নেই:' }}
@php $tags = explode(',', $ln_pg->negative_tags); @endphp @foreach($tags as $tag) @if(trim($tag) != '') {{ trim($tag) }} @endif @endforeach
@endif
@endif {{-- 4. HOW TO IDENTIFY --}} @if(!empty($ln_pg->identify_title))
{{ $ln_pg->identify_badge ?? 'খাঁটি প্রোডাক্ট চেনার উপায়' }}

{{ $ln_pg->identify_title ?? 'আসল পণ্য চেনার উপায়' }}

{{ $ln_pg->identify_subtitle ?? 'এই লক্ষণগুলো দেখলেই বুঝবেন পণ্য খাঁটি কিনা' }}

{{-- Loop through id_1 to id_8 --}} @for($i=1; $i<=8; $i++) @if(!empty($ln_pg->{'id_'.$i.'_title'})) @php $iconClass = $ln_pg->{'id_'.$i.'_icon'} ?: 'fa-check'; if(!preg_match('/^(fas|far|fab|fal|fa-solid|fa-regular|fa-brands)\s/', $iconClass)) { $iconClass = 'fas ' . $iconClass; } @endphp
{{ $ln_pg->{'id_'.$i.'_title'} }}

{{ $ln_pg->{'id_'.$i.'_desc'} }}

@endif @endfor
@if($sliderImages->count() > 0) @else Product @endif
@endif {{-- 5. DARK TRUST BADGE SECTION --}}

{{ $ln_pg->dhamaka_title ?: 'ঝুঁকিমুক্ত অর্ডার করুন' }}

উন্নত মান
ক্যাশ অন ডেলিভারি
দ্রুত ডেলিভারি
২৪/৭ সাপোর্ট
{{-- 6. TEXT BASED REVIEW CAROUSEL --}} @if(!empty($ln_pg->review_title))
{{ $ln_pg->review_badge ?? 'গ্রাহকদের মতামত' }}

{{ $ln_pg->review_title ?? 'গ্রাহকদের মতামত' }}

{{ $ln_pg->review_subtitle ?? 'হাজারো সন্তুষ্ট পরিবার আমাদের সাথে আছে' }}

@for($i=1; $i<=3; $i++) @if(!empty($ln_pg->{'stat_'.$i.'_num'}))

{{ $ln_pg->{'stat_'.$i.'_num'} }}

{{ $ln_pg->{'stat_'.$i.'_text'} }}

@endif @endfor
@endif {{-- 7. ORDER FORM SECTION --}}
{{ $ln_pg->form_title ?: 'অর্ডার কনফার্ম করতে নিচের ফর্মটি পূরণ করুন' }}
@csrf
{{-- Left Side: Billing Details --}}
১. বিলিং ও শিপিং তথ্য:
{{ ($variations->count() > 0) ? '৩' : '২' }}. পেমেন্ট মাধ্যম:
@if($sslActive == 1)
@endif
{{-- Right Side: Order Summary --}}
অর্ডারের সারাংশ:
{{ $productName }}
{{ $defaultPrice }}
{{ $defaultStock > 0 ? 'In Stock' : 'Out of Stock' }}
{{-- ✅ NEW: SELECT DROPDOWN LOGIC ✅ --}} @if($variations->count() > 0)
২. প্রোডাক্ট অপশন:
@endif {{-- ✅ COUPON SECTION ✅ --}} @if(isset($information->coupon_visibility) && $information->coupon_visibility == 1)
@endif @php $sessionDiscount = session('coupon_discount') ?? 0; @endphp
পরিমাণ
সাবটোটাল{{ $defaultPrice }}
ডেলিভারি চার্জ+ 0
{{-- ✅ DISCOUNT CALCULATION ROW ✅ --}}
ডিসকাউন্ট - {{ $sessionDiscount }}
সর্বমোট বিল{{ $defaultPrice }}
{{-- 8. FAQ SECTION --}} @if(!empty($ln_pg->faq_title))
{{ $ln_pg->faq_badge ?? 'জিজ্ঞাসা' }}

{{ $ln_pg->faq_title ?? 'সচরাচর জিজ্ঞাসিত প্রশ্ন (FAQ)' }}

@for($i=1; $i<=4; $i++) @if(!empty($ln_pg->{'faq_'.$i.'_q'}))
{{ $ln_pg->{'faq_'.$i.'_q'} }}
{{ $ln_pg->{'faq_'.$i.'_a'} }}
@endif @endfor
@endif {{-- ✅✅✅ OTP MODAL ADDED HERE ✅✅✅ --}}
{{-- DYNAMIC MAIN FOOTER INCLUDED --}} @include('frontend.partials.footer') {{-- SCRIPTS --}}