diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index df68878..420cc51 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -209,6 +209,41 @@ class ProductController extends Controller ]); } + public function announcements(Request $request) + { + // Static announcements for now - can be moved to database later + $announcements = [ + [ + 'icon' => '🎉', + 'message' => 'Free Shipping on orders over $250', + 'detail' => "Don't miss a discount!" + ], + [ + 'icon' => '💰', + 'message' => 'Money back guarantee', + 'detail' => 'We return money within 30 days' + ], + [ + 'icon' => '💪', + 'message' => 'Friendly 24/7 customer support', + 'detail' => "We've got you covered!" + ] + ]; + + // Render announcement slides HTML + $announcementHtml = ''; + foreach ($announcements as $announcement) { + $announcementHtml .= '
'; + } + + return response()->json([ + 'success' => true, + 'announcements' => $announcementHtml + ]); + } + public function highlights(Request $request) { $type = $request->input('type', 'new'); diff --git a/app/View/Components/Layout/TopAnnouncementHeader.php b/app/View/Components/Layout/TopAnnouncementHeader.php new file mode 100644 index 0000000..a4b80c9 --- /dev/null +++ b/app/View/Components/Layout/TopAnnouncementHeader.php @@ -0,0 +1,25 @@ + -