Main module for displaying products on the home page and applying filters.
- Source:
Methods
(inner) applyFilters()
(CORE LOGIC) Applies all current filters (color, season, price, search) to the bouquet list and re-renders the display.
- Source:
(async, inner) fetchAndInitialize()
Fetches products from the API, initializes the list, and applies initial filters.
- Source:
Throws:
-
If fetching from API fails.
- Type
- Error
(inner) renderProductCard()
Creates the HTML for a single product card.
- Source:
(inner) renderProductList(bouquetsToRender)
Renders the list of filtered bouquets into the container.
Parameters:
| Name | Type | Description |
|---|---|---|
bouquetsToRender |
Array.<object> | Array of bouquets to display. |
- Source:
(inner) setupAdvancedFilterListener()
(NEW) Sets up listeners for the advanced filter panel (price).
- Source:
(inner) setupColorFilterListeners()
Sets up event listeners for the color filter dots (with toggle logic).
- Source:
(inner) setupSearchFilterListener()
Sets up event listener for the search input.
- Source:
(inner) setupSeasonalFilterListener()
Sets up event listener for the seasonal button (toggle).
- Source: