Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICO-245 Fix homepage loading #118

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

claudiulazardd
Copy link
Collaborator

@claudiulazardd claudiulazardd commented Feb 25, 2025

  1. It seems for homepage you need to send "/", not empty ""
  2. Replace the url with the new seo-url based on the language. This will only happen for cms page/pdp/landing pages.
    If the admin of the shopware configures categories with different seo-urls per language, we need to do a request do get the new seoPathInfo for the active navigation so that we can replace the url to the one which is language specific. In this way if the user refreshes the page it will get the page instead of having a 404 because it tried getting a SEO-URL for a different language.

@@ -0,0 +1,13 @@
export const useSeoUrlStore = defineStore('seoUrl', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a Store is necessary in this case since the data is not supposed to be shared throughout multiple pages or in other words it is reset/reassigned for each page. Usage of inject/provide would be more fitting for the circumstances.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it should be shared with the root of pages and the languageSwitch component which is situated in the layout. Using the context('navigation') doesn't work because ...all and the languageSwitch are siblings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants