-
Notifications
You must be signed in to change notification settings - Fork 1
Shop and Browsing
The /shop page displays all active products with pagination, filtering, and sorting.
Products are displayed 12 per page. Page numbers with previous/next navigation appear at the bottom. Pages with ellipsis for large catalogs (e.g., 1 ... 4 5 6 ... 20).
Category pills appear below the page title. Each pill shows the category name and product count. Click a category to filter. Click "All Products" to reset. Browsing a parent category automatically includes products from its subcategories.
Dropdown at the top right with options:
- Newest First (default)
- Oldest First
- Price: Low to High
- Price: High to Low
- Name: A-Z
- Name: Z-A
Sort selection is preserved when changing pages or categories.
Visiting /category/your-category-slug shows the same layout as the shop page, filtered to that category. Includes pagination and sorting. Subcategory products are included automatically.
The /search?q=term endpoint searches product names and descriptions. Results are paginated (12 per page). Minimum query length is 2 characters. LIKE wildcards in the search term are escaped to prevent injection.
The store header includes:
- Home — links to the homepage
-
Shop All — links to
/shop - Category dropdowns — top-level categories with subcategory menus
-
Search — links to
/search
The homepage shows the first 12 products with a "View All Products →" button linking to the shop page.