Add category detail URLs and polish mega menu UX.
Route categories to /products/category/{id}/{slug}, improve menu hover/layout, and hide stock/category clutter on product cards.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
5d53cf91eb
commit
f078cdad0e
+6
-3
@@ -40,7 +40,8 @@ This site is **catalog-only** (no shopping cart). Login / user icon goes to the
|
||||
| Path | Source |
|
||||
| --- | --- |
|
||||
| `/` | Homepage + static image slots + store specials + latest blogs |
|
||||
| `/products` | Catalog / store items list |
|
||||
| `/products` | Catalog / store items list + search (`?q=`) |
|
||||
| `/products/category/[id]/[slug]` | Category page via `GET .../categories/by-id/{id}` + products filtered by `categoryId` |
|
||||
| `/products/[id]/[slug]` | Product detail via `GET .../products/by-id/{id}` |
|
||||
| `/blog` | Blog list |
|
||||
| `/blog/[id]/[slug]` | Blog detail via `GET .../blogs/by-id/{id}` |
|
||||
@@ -68,7 +69,7 @@ Products list/search: prefer store-items; if empty, fall back to `GET /products`
|
||||
|
||||
## Catalog
|
||||
|
||||
- Mega menu: product categories **level 1 and 2** (`GET /tenants/{domain}/categories?entityType=product`). Links: `/products?categoryId={id}`.
|
||||
- Mega menu: full product category tree (unwraps shallow roots like «کالاها»); nested level-4+ links (`GET /tenants/{domain}/categories?entityType=product`). Links: `/products/category/{id}/{nameFaSlug}`.
|
||||
- Instant search: header input searches **products** when query length **> 2** (`/api/search` → `store-items?name=`). Enter or “مشاهده همه” → `/products?q=`.
|
||||
- Product pages are display-only (price, gallery, description, comments). No cart / add-to-cart.
|
||||
- Details gallery: product `images[].url` + thumbnail. Click = lightbox, hover = zoom.
|
||||
@@ -98,8 +99,10 @@ Products list/search: prefer store-items; if empty, fall back to `GET /products`
|
||||
- After deploy: business dashboard → Website → Settings → Sync sitemap config.
|
||||
- Detail URLs (Meshkee defaults — omit `templates` unless customized):
|
||||
- Product: `/products/{id}/{nameFaSlug}` — slugify `nameFa` (Farsi kept, spaces → `-`); resolve with `products/by-id/{id}`. Never use legacy DB slug in public URLs.
|
||||
- Category: `/products/category/{id}/{nameFaSlug}` — `categories/by-id/{id}` then list products with that `categoryId`.
|
||||
- Blog: `/blog/{id}/{titleSlug}` — `blogs/by-id/{id}`.
|
||||
- Legacy `/products/{slug}` and `/blog/{slug}` redirect to the canonical `{id}/{slug}` form.
|
||||
- Legacy `/products?categoryId=` and slug-only detail URLs redirect to the canonical `{id}/{slug}` form.
|
||||
- Live sitemap is an index: `/sitemap.xml` → `/sitemap-main.xml` + `/sitemap-products.xml` (Meshkee/nginx; do not ship static files).
|
||||
- Every public page has unique title/description; product/blog prefer CMS fields.
|
||||
|
||||
## Original business data (do not invent replacements)
|
||||
|
||||
Reference in New Issue
Block a user