-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Save product using repository in adminhtml controller #18950
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
Save product using repository in adminhtml controller #18950
Conversation
Hi @JeroenVanLeusden. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
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.
Not sure if it will pass the builds but let's try. A bit surprised $saveOptions
is not used anymore.
Hi @orlangur, thank you for the review. |
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.
@JeroenVanLeusden please check tests failing on Travis CI.
@orlangur @JacobBrownAustin I don't think Travis fails are related to the PR |
@magento-engcom-team give me test instance |
Hi @sivaschenko. Thank you for your request. I'm working on Magento instance for you |
Hi @sivaschenko, here is your new Magento instance. |
7d22973
to
8e23ebf
Compare
@JeroenVanLeusden this improvement is incorrect, as ProductRepository currently is trying to load product by sku before saving it.
So creating new product with existing sku will just override existing one instead of creating new with the modified sku. You can try to fix this bug or wait until magento-engcom/import-export-improvements#119 would be merged, as this PR may resolve this problem. |
@p-bystritsky I can wait till that PR is merged. Does that mean I have to wait till the fixed is merged into main line and re-submit the PR? |
@JeroenVanLeusden, no, just wait. |
Hi @JeroenVanLeusden, thank you for your contribution! |
Description (*)
Save product in
Magento\Catalog\Controller\Adminhtml\Product\Save
using Repository. Will be much easier to customize the flow if a plugin can be created on theRepository::save()
method.Fixed Issues (if relevant)
Contribution checklist (*)