@php use Botble\Base\Facades\BaseHelper; /** * Section heading with countdown widget in col-right + product swiper. * Mirrors html/home-bag-accessories.html lines 2199-2548 (`Product Countdown`): *
*
*

Title

Subtitle

*
*
*
*
*
*
*
...4-up product slider...
*
* * Seeder must pass `title=''` + `subtitle=''` (suppresses index's centered heading) * and use `custom_title` / `custom_subtitle` here. `target_date` is parsed via strtotime * → seconds-from-now for the countdown JS timer. */ $sliderId = 'ecommerce-products-countdown-slider-' . uniqid(); $perView = (int) ($shortcode->items_per_row ?: 4); $perView = max(1, min(6, $perView)); $customTitle = trim((string) ($shortcode->custom_title ?? '')); $customSubtitle = trim((string) ($shortcode->custom_subtitle ?? '')); $targetDate = trim((string) ($shortcode->target_date ?? '')); // Compute seconds-from-now for the countdown widget. Defaults to 12 days // out so the timer always shows non-zero on a freshly seeded site. $secondsRemaining = 1093120; if ($targetDate !== '') { $ts = strtotime($targetDate); if ($ts !== false) { $diff = $ts - time(); if ($diff > 0) { $secondsRemaining = $diff; } } } $countdownClass = trim((string) ($shortcode->countdown_class ?? 'countdown-v08')); @endphp @if ($customTitle !== '' || $customSubtitle !== '')
@if ($customTitle !== '')

{!! BaseHelper::clean($customTitle) !!}

@endif @if ($customSubtitle !== '')

{!! BaseHelper::clean($customSubtitle) !!}

@endif
@endif
@foreach ($products as $product)
@includeIf(Theme::getThemeNamespace('views.ecommerce.includes.product-item'), ['product' => $product])
@endforeach