Skip to content

Shop and Browsing

Lohit edited this page Apr 20, 2026 · 1 revision

Shop & Browsing

Shop Page

The /shop page displays all active products with pagination, filtering, and sorting.

Pagination

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 Filters

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.

Sorting

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.

Category Pages

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.

Search

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.

Navigation

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.

Clone this wiki locally