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

Menu Items Using Live Link #11038

Merged
merged 11 commits into from
May 20, 2021
Merged

Menu Items Using Live Link #11038

merged 11 commits into from
May 20, 2021

Conversation

MatthewKennedy
Copy link
Contributor

@MatthewKennedy MatthewKennedy commented May 18, 2021

This PR uses live links rather than paths stored in the database and are both accessible through the standard Storefront and API.

Benefits:

  • Paths are not stored in the DB, so no chance of data ever being out of sync due to some unforeseen circumstance such as a dev changing the Spree::Config[:storefront_product_path] at some stage after menus have been created.

Downside:

  • Performance may be slower as links are loaded live, but the cache might resolve this.

NOTE:
Spree::Config[:storefront_product_path] has been added to the Front End config/roots.rb allowing users to set the frontend taxon and product paths, helping users migrate from other platforms to Spree and keep their paths example:
/collections/women vs /t/women.

@damianlegawiec damianlegawiec added this to the 4.3 milestone May 19, 2021
Copy link
Member

@damianlegawiec damianlegawiec left a comment

Choose a reason for hiding this comment

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

Nice!

@damianlegawiec damianlegawiec merged commit 79956da into master May 20, 2021
@delete-merged-branch delete-merged-branch bot deleted the nav-using-link branch May 20, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants