Media Gallery behavior when duplicating a product: use copied images#5225
Open
m-michalis wants to merge 1 commit intoOpenMage:mainfrom
Open
Media Gallery behavior when duplicating a product: use copied images#5225m-michalis wants to merge 1 commit intoOpenMage:mainfrom
m-michalis wants to merge 1 commit intoOpenMage:mainfrom
Conversation
… to a separate step after the product has been duplicated (after getResource()->duplicate(oldid,newid)) - fixed logic for the duplicated product to actually use the copied images (years old bug)
|
Contributor
|
This PR is well elaborated and implemented. Thank you @m-michalis for your contribution. I kindly ask those who have some time available to test and get it ready for 2.17.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This is the 3rd PR based on @addison74's #5026 (comment)
Parts:
Keep/Skip product images (this pr): Ask whether to keep or skip product images on "Duplicate" + configuration for automating this behaviorMedia Gallery behavior when duplicating a product: Keep/Skip product images #5083Description
Fixes a long-standing issue in the product duplication workflow where product image files were physically copied but not associated with the duplicated product.
This change decouples the image copy logic in
magento-lts/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php
Line 96 in 46a1093
and executes it as a dedicated step after the product has been successfully duplicated:
magento-lts/app/code/core/Mage/Catalog/Model/Product.php
Lines 1463 to 1466 in 46a1093