Skip to content
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

Fix for catalog_product_relation not being deleted when bundle option deleted. #4395

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

dannydnz
Copy link
Contributor

@dannydnz dannydnz commented Nov 28, 2024

Description (*)

Patch for when a Bundle option or selection is deleted. Previously product would have to be saved twice to remove the catalog_product_relation row. This messes with some indexes.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. Remove an option from a bundle and save.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the Component: Bundle Relates to Mage_Bundle label Nov 28, 2024
@kiatng
Copy link
Contributor

kiatng commented Nov 28, 2024

I can replicate this in DDEV with sample product ID 447 and monitoring the table catalog_product_relation.
image

When a child product is deleted, the product needs to save twice for the table to be refreshed. With this PR, the table is refreshed on product save.

@kiatng kiatng closed this Nov 28, 2024
@kiatng kiatng reopened this Nov 28, 2024
@kiatng
Copy link
Contributor

kiatng commented Nov 28, 2024

Sorry for accidentally closing the PR. @dannydnz Is your change in production, have you tested it and is satisfied that it has no side-effect?

@sreichel
Copy link
Contributor

Testing it, but please upgrade the description/title. Only your branch name tells its about bundle items.

Copy link
Contributor

@sreichel sreichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested.

Thanks.

@dannydnz dannydnz changed the title Fix for catalog_product_relation not being deleted when option deleted. Fix for catalog_product_relation not being deleted when bundle option deleted. Nov 28, 2024
@dannydnz
Copy link
Contributor Author

dannydnz commented Nov 28, 2024

Have updated PR title. Yes is in production. No issues so far.

@kiatng kiatng merged commit a1f0cf1 into OpenMage:main Nov 29, 2024
1 check passed
@kiatng
Copy link
Contributor

kiatng commented Nov 29, 2024

@all-contributors please add @dannydnz for code

fballiano added a commit to MahoCommerce/maho that referenced this pull request Nov 29, 2024
@sreichel
Copy link
Contributor

@all-contributors please add @dannydnz for code

#1126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Bundle Relates to Mage_Bundle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants