Open Hurrpadurr opened 2 months ago
Hi @Hurrpadurr. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @Hurrpadurr,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the attached video.
https://github.com/user-attachments/assets/38cdb4d4-5b48-4140-91ad-a529bbdbb191
Both products in the cart are updated to reflect the same customizable options as the product being edited, regardless of their previous settings.
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12846 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
From what I can tell, the \Magento\Quote\Model\Quote\Item\Compare::compare()
function was modified to add a SKU check to the beginning of the function.
if ($target->getSku() !== null && $target->getSku() === $compared->getSku()) {
return true;
}
This causes the function to return before the checks for custom options and such which should differentiate the quote items and not simply merge them.
I have no idea what this check was added to solve, but I'm going to test simply removing it in an override.
I think the only situation I could see the above code being necessary is if somehow products sharing a SKU from different storefronts were added to the cart such that they would have different product IDs. I'm not sure what scenario would result in this.
I guess if you reworked it to run the compareOptions() checks IF the product IDs are identical. Then do the SKU check. But even in that case I think you'd want to check the custom options and not necessarily just merge the same-sku-different-id product. I think you'd only want to do that if the product(s) in question had no custom options.
As far as I know it shouldn't be possible for multiple products in one storefront to have the same SKU though, so this check does still seem unnecessary. Maybe I'm wrong.
Preconditions and environment
2.4.7-p2
Steps to reproduce
Note that both products are correctly added as separate items in the cart.
Expected result
Only the selected product in the cart should update its customizable options according to the changes made.
Actual result
Both products in the cart are updated to reflect the same customizable options as the product being edited, regardless of their previous settings.
Additional information
A workaround is to remove the affected product and re-add it with the correct options, but this is not an ideal solution.
Release note
No response
Triage and priority