@php /** * Style-2 grid card. * Full-bleed image with the action buttons overlaid on the image bottom * (revealed on hover); the info block (name, rating, price) sits below. * * Inputs: $product, $showQuickView, $showQuickShop */ use Botble\Media\Facades\RvMedia; $showQuickView = $showQuickView ?? true; $showQuickShop = $showQuickShop ?? true; $primaryImage = RvMedia::getImageUrl($product->image, 'product-grid', false, RvMedia::getDefaultImage()); $hoverImage = null; if (! empty($product->images) && is_iterable($product->images)) { foreach ($product->images as $img) { if (! is_string($img) || trim($img) === '' || $img === $product->image) { continue; } $hoverImage = RvMedia::getImageUrl($img, 'product-grid', false, null); if ($hoverImage) { break; } } } @endphp
{{ $product->name }} @if ($hoverImage) {{ $product->name }} @endif @include(EcommerceHelper::viewPath('includes.product.badges'), ['product' => $product]) @include(EcommerceHelper::viewPath('includes.product.countdown'), ['product' => $product]) {{-- Action buttons live inside the positioned wrapper (matching styles 1/3/4/5). .product-action_list is position:absolute, so it must be contained by a positioned ancestor; the info block below is static, which let the buttons escape to the bottom of the page. --}} @include(EcommerceHelper::viewPath('includes.product.style-2.actions'), [ 'product' => $product, 'showQuickView' => $showQuickView, 'showQuickShop' => $showQuickShop, ])
@include(Theme::getThemeNamespace('views.ecommerce.includes.product.store-name'), ['product' => $product]) {{ $product->name }} @include(EcommerceHelper::viewPath('includes.product.style-2.rating'), ['product' => $product]) @include(EcommerceHelper::viewPath('includes.product.style-2.price'), ['product' => $product])