{{-- E-commerce Products Component (Integration with existing widget) --}} @php $displayType = $component['content']['display_type'] ?? 'grid'; $productsPerRow = $component['content']['products_per_row'] ?? 4; $showPrice = $component['content']['show_price'] ?? true; $showAddToCart = $component['content']['show_add_to_cart'] ?? true; $categoryFilter = $component['content']['category_filter'] ?? null; $limit = $component['content']['limit'] ?? 8; // Get products from e-commerce module if available $products = []; if (class_exists('\App\Models\Product')) { $query = \App\Models\Product::where('status', 'active'); if ($categoryFilter) { $query->where('category_id', $categoryFilter); } $products = $query->limit($limit)->get(); } @endphp @if(count($products) > 0)
{{ Str::limit($product->short_description, 80) }}
@endif @if($showPrice)Get started by adding your first products to showcase them here.