-
-
Notifications
You must be signed in to change notification settings - Fork 450
Bypass custom options checks for bundled child items #3995
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: main
Are you sure you want to change the base?
Changes from 1 commit
bb652da
d566032
8c07451
f865a9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -451,6 +451,13 @@ public function representProduct($product) | |
| if ($this->getParentItem() !== $stickWithinParent) { | ||
| return false; | ||
| } | ||
|
|
||
| /** | ||
| * Bypass custom options checks for bundled child items | ||
| * This prevents cases of adding an additional child item to the quote | ||
| * when an existing child product is modified while the bundled item is in a cart | ||
| */ | ||
| return true; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible that a product that's not simple gets here? I mean, are we sure that there's no other case that needs to proceed to the compareOptions part? this is a though one
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is indeed a tricky bug. Compare items looks at a few keys, excluding /**
* Not Represent options
*
* @var array
*/
protected $_notRepresentOptions = ['info_buyRequest'];The goal of the function is to match a newly added product with an existing item in the quote. I don't think a simple product will ever make it to this block, because at this point we've checked:
If nothing has changed in the quote_item_options for the particular child, there is no point in comparing options anyways. However in the case where a customer re-adds an item that was existing after a product change, we may have some discrepancies. To add context here, this is an example of the option failing for the bundled product that caused this bug: There isn't much metadata there, but the price alone causes |
||
| } | ||
|
|
||
| // Check options | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.