-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Checking if the variant belongs to current product #3267
Checking if the variant belongs to current product #3267
Conversation
I think this is a workaround, as we shouldn't be getting a selectedVariant that's not associated with the product, but this fixes several pretty serious bug and fixing the source of the issue may involve rewriting some core PDP stuff. |
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.
Tested. Verified fixed.
Could you test again?
|
@janus-reith I believe we dropped support for browsing to particular variant by URL a while ago. Is that what you mean? Since this is already released, if you have a problem can you open a new issue? |
Checking if the variant belongs to current product
Fix for #3227
Problem
The variantId was not getting updated when selecting a new product.
Solution
In the check for updating the product/variant instead of only checking if
variantId == null
also check thatvariantId
belong to the selected productAnother solution
Maybe a better solution is to call
ReactionProduct.setCurrentVariant(null)
as soon as some PDP page is opened.To test
reaction