-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#39905 Product Removed on Mobile Still Appears in Web's Mini Compare Section Until Re-login #40023
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
base: 2.4-develop
Are you sure you want to change the base?
Conversation
…ompare Section Until Re-login Integrates the Product Compare helper across compare list resolvers to trigger updates after adding, removing, or creating compare lists. Also forces a reload of compare product data on the frontend to maintain accuracy.
Hi @KrasnoshchokBohdan. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
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.
Hi @KrasnoshchokBohdan
Thanks for your PR.
Could you please fix static tests and add new tests for fixed issue?
Thanks
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.
@Den4ik Hi!
Sorry to bother you. I probably should have marked this as a draft immediately.
Currently, I'm struggling with a solution for reloading the compare-product customer section after changes made by a GraphQL mutation (
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.
Hi @KrasnoshchokBohdan
Thanks for details
…ompare Section Until Re-login Introduced CompareCookieManager to manage cookie invalidation for compare list products. Updated resolvers to use this service and ensure cookies are marked invalid after product compare list operations. Removed redundant client-side cookie reload logic in the frontend.
@magento run all tests |
@magento run all tests |
…ompare Section Until Re-login Introduced `CompareCookieManager` enhancements with better cookie management through visibility modifiers and documentation changes. Suppressed warnings for PHPMD where relevant and added comprehensive unit tests for cookie handling, including edge cases like size limits and failures.
@magento run all tests |
Description (*)
createCompareList
addProductsToCompareList
removeProductsFromCompareList
After these mutations, the counter in the header and in the customer account does not change. I found \Magento\Catalog\Helper\Product\Compare::calculate, which updates the quantity in _catalogSession, but the counters actually get their data from the customer data (compare-products section). To get an accurate quantity, the session needs to be updated, which is quite contradictory when considering the issue in the GraphQL scope.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)