@php use Botble\Base\Facades\BaseHelper; use Botble\Media\Facades\RvMedia; /** * Best-Sale composite (home-garden Section 2). * Mirrors html/home-garden.html lines 1688-2080: *
*
*

Title

Subtitle

* *
*
*
* <-- 1 banner *
...
<-- 2 cards *
*
*
...
<-- 4 cards *
*
* * Shortcode attrs: * title, subtitle — section heading (rendered here, NOT via section-title) * view_all_text, view_all_url — col-right CTA link * banner_image, banner_heading, banner_subheading, banner_button_text, banner_button_url * source, limit (=6 expected) — passed through standard shortcode handler * * Note: The parent ecommerce-products/index.blade.php wraps this in * `
...`, * and only renders its own centered heading if `title`/`subtitle` is set on the * shortcode. We render our own custom heading + leave title/subtitle BLANK on the * shortcode call to suppress the default centered version. */ $heading = (string) ($shortcode->custom_title ?? ''); $subheading = (string) ($shortcode->custom_subtitle ?? ''); $viewAllText = (string) ($shortcode->view_all_text ?? __('View All Products')); $viewAllUrl = (string) ($shortcode->view_all_url ?? '#'); $bannerImage = (string) ($shortcode->banner_image ?? ''); $bannerHead = (string) ($shortcode->banner_heading ?? ''); $bannerSub = (string) ($shortcode->banner_subheading ?? ''); $bannerBtn = (string) ($shortcode->banner_button_text ?? __('Shop Now')); $bannerUrl = (string) ($shortcode->banner_button_url ?? '#'); // Split products into the demo's left (2 cards) + right (4 cards) layout. $list = collect($products); $leftCol = $list->slice(0, 2)->values(); $rightCol = $list->slice(2, 4)->values(); @endphp @if ($heading !== '' || $subheading !== '')
@if ($heading !== '')

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

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

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

@endif
@endif
@if ($bannerImage !== '') @endif @if ($leftCol->isNotEmpty())
@foreach ($leftCol as $product) @includeIf(Theme::getThemeNamespace('views.ecommerce.includes.product-item'), ['product' => $product]) @endforeach
@endif
@if ($rightCol->isNotEmpty())
@foreach ($rightCol as $product) @includeIf(Theme::getThemeNamespace('views.ecommerce.includes.product-item'), ['product' => $product]) @endforeach
@endif