fix: resolve issue #17 - Product page: Implement Breadcrumb #38
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Shop/Shop-Storefront#38
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix/issue-17"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR addresses the bug reported in issue #17.
Claude Code Analysis
Everything looks good. Here's the summary:
Root cause: No breadcrumb component existed anywhere on product or collection pages; the category page had an inline ad-hoc breadcrumb pattern.
Changes made:
Created
src/modules/common/components/breadcrumb/index.tsx— reusableBreadcrumbcomponent acceptingcrumbs: { label: string; href?: string }[]. UsesLocalizedClientLinkfor links (auto-prepends country code) and emits aBreadcrumbListJSON-LD<script>tag for SEO.Updated
src/modules/products/templates/index.tsx— added breadcrumb above the product container. Crumbs:Home → Store → [Category (if present)] → Product title. Category is taken fromproduct.categories[0]if available.Updated
src/modules/categories/templates/index.tsx— replaced the inline parent-category link pattern with the sharedBreadcrumbcomponent. Crumbs:Home → [parent categories in order] → Current category.Lint result: The
next lintcommand fails due to a pre-existing environment variable requirement (NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY) and an unrelated@next/next/no-html-link-for-pagesconfig issue in the repo. TypeScript compilation (tsc --noEmit) reports zero errors in any of the three modified files.Closes #17
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.