-
Notifications
You must be signed in to change notification settings - Fork 2.1k
add redirection in component for simple product related to configurable product #4426
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
add redirection in component for simple product related to configurable product #4426
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/shopware-pwa/vue-storefront/n3wf1qbo7 |
| checkParentRedirection(product, parentProduct) | ||
| } else { | ||
| throw new Error(`Product query returned empty result product visibility = ${product.visibility}`) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redirect itself seems to work fine. However, I'm thinking whether it would be good to decouple this setting from the visibility configuration.
Having them uncoupled would allow showing a child product on category page, but the link would take you to the parent product.
But this is just my thought. I'm not sure how may shops would actually find this useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action is called only on PDP. So with that you can still show simple product on category page and after going on PDP you will be redirected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also coupled it with visibility because we should check this only when its needed. Right now we are making request for every simple product. With this change it will be done only when you want to get on PDP where simple product shouldn't be visible
Related Issues
closes #4359
Short Description and Why It's Useful
Screenshots of Visual Changes before/after (if There Are Any)
Which Environment This Relates To
Check your case. In case of any doubts please read about Release Cycle
developbranch and want to merge it back todevelopreleasebranch and want to merge it back toreleasehotfixormasterbranch and want to merge it back tohotfixUpgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.mdwith description of your changeContribution and Currently Important Rules Acceptance