@php /** * @var \Botble\Shortcode\Compilers\Shortcode $shortcode * @var \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator $products */ $allowed = ['style-grid', 'style-slider', 'style-list', 'style-featured', 'style-mini-list', 'style-tabs', 'style-grid-with-banner', 'style-banner-carousel-side', 'style-slider-countdown', 'style-slider-side-heading', 'style-auto-flash-sale', 'style-auto-featured-tabs', 'style-auto-mini-list-with-banner', 'style-thumbs-arrival']; $style = in_array($shortcode->style, $allowed, true) ? $shortcode->style : 'style-grid'; $tabs = $tabs ?? null; $hasViewAllHeading = false; // Styles that render their own heading column + a full-bleed container // (home-fashion-2 §7: left col-lg-3 heading + right col-lg-9 slider). // style-thumbs-arrival renders its own 2-col layout (LEFT: tag+title+desc+thumb-swiper, // RIGHT: main-product-swiper) per html/home-decor.html §6 lines 1994-2133. Suppress // the outer .container wrap so the inner sw-thumbs-arrival owns the row. $selfHeadingStyles = ['style-tabs', 'style-auto-featured-tabs', 'style-slider-side-heading', 'style-thumbs-arrival']; // container_class: per-preset override of the inner container wrapper. // home-office-equipment §6 needs `container-full full-v2`; default keeps the // existing per-style behaviour. $containerClassOverride = trim((string) ($shortcode->container_class ?? '')); $containerClass = $containerClassOverride !== '' ? $containerClassOverride : ($style === 'style-slider-side-heading' ? 'container-full' : 'container'); // Per-preset section class override (e.g. "section-top-pick-v02" for construction). $sectionClassOverride = trim((string) ($shortcode->section_class ?? '')); $sectionClasses = $sectionClassOverride !== '' ? $sectionClassOverride : trim('ecommerce-products ecommerce-products--' . $style . ' flat-spacing ' . ($style === 'style-auto-flash-sale' ? 'pt-0' : '')); @endphp @if (! empty($products) && (is_countable($products) ? count($products) : 0) > 0)
@if (! in_array($style, $selfHeadingStyles, true) && ($shortcode->title || $shortcode->subtitle)) @php $titleAlign = $shortcode->title_align ?: 'center'; $useSideNav = $titleAlign === 'side-nav'; $sliderId = 'ecommerce-products-slider-' . uniqid(); $viewAllUrl = trim((string) ($shortcode->view_all_url ?? '')); $viewAllText = $shortcode->view_all_text ?: __('View All'); $hasViewAllHeading = $titleAlign === 'left' && $viewAllUrl !== ''; @endphp @if ($useSideNav)
@if ($shortcode->title)

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->title) !!}

@endif @if ($shortcode->subtitle)

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->subtitle) !!}

@endif
@elseif ($hasViewAllHeading) {{-- subtitle_position: 'left' (default) subtitle stacks under title in left col 'right' subtitle moves into the right column ABOVE the CTA — matches html/home-furniture.html §3 L1582-1604 'above' subtitle (eyebrow) renders ABOVE the title in the left col with `s-desc cl-text-3 fw-semibold mb-8` + `h2 s-title font-outfit mb-0 letter-space-0` — matches html/home-organic.html §5 L2032-2048. --}} @php $subtitlePos = in_array($shortcode->subtitle_position ?? '', ['left', 'right', 'above'], true) ? $shortcode->subtitle_position : 'left'; @endphp
@if ($shortcode->subtitle && $subtitlePos === 'above')

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->subtitle) !!}

@endif @if ($shortcode->title) @if ($subtitlePos === 'above')

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->title) !!}

@else

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->title) !!}

@endif @endif @if ($shortcode->subtitle && $subtitlePos === 'left')

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->subtitle) !!}

@endif
@if ($shortcode->subtitle && $subtitlePos === 'right')

{!! \Botble\Base\Facades\BaseHelper::clean($shortcode->subtitle) !!}

@endif {!! \Botble\Base\Facades\BaseHelper::clean($viewAllText) !!}
@else @include(Theme::getThemeNamespace('partials.section-title'), [ 'title' => $shortcode->title, 'subtitle' => $shortcode->subtitle, 'align' => $titleAlign, ]) @endif @endif @include(Theme::getThemeNamespace('partials.shortcodes.ecommerce-products.styles.' . $style), ['sliderId' => $sliderId ?? null]) @if (! $hasViewAllHeading && $shortcode->show_view_all && $shortcode->view_all_url) @endif
@endif