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

REST API: Can't update custom option through /V1/products/options/{optionId} #5972

Closed
thomasnordkvist opened this issue Aug 3, 2016 · 3 comments
Assignees
Labels
bug report Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@thomasnordkvist
Copy link

thomasnordkvist commented Aug 3, 2016

Preconditions

  1. Magento version 2.1

Steps to reproduce

  1. Install magento
  2. Create a product with sku: test-sku
  3. Add a custom option by POST: rest/V1/products/option with body:

{
"option": {
"product_sku" : "test-sku",
"title" : "Option title",
"type" : "area",
"price_type" : "fixed"
}
}

Try to update the option by PUT: rest/V1/products/option/(option_id created from POST) with body

{
"option": {
"product_sku" : "test-sku",
"option_id" : (option_id created from POST),
"title" : "Option title changed",
"type" : "area",
"price_type" : "fixed"
}
}

Expected result

  1. The title should have been updated.

Actual result

  1. New options get added instead of updating old. This happens in all store view so it's not possible to add translated titles to different store views.

Maybe related to #5885 and #5931

@piotrekkaminski piotrekkaminski added Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog bug report labels Aug 3, 2016
@choukalos choukalos assigned mbrinton01 and unassigned choukalos Aug 4, 2016
@NotAndD
Copy link

NotAndD commented Jan 20, 2017

Still here in 2.1.3, custom options can't be updated as a PUT request create a new one instead of updating the old one.
The only way to update is to create a new one and delete the old one? Seems like a weird and not efficient workaround.

@mbrinton01
Copy link

@misha-kotov please investigate this issue. Possibly related to MAGETWO-59315. Could not reproduce on develop branch.

@mbrinton01 mbrinton01 assigned misha-kotov and unassigned mbrinton01 Jan 27, 2017
@magento-engcom-team magento-engcom-team added bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@thomasnordkvist, thank you for your report.
The issue is already fixed in 2.2.0

@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.2.x The issue has been fixed in 2.2 release line Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Sep 20, 2017
mmansoor-magento pushed a commit that referenced this issue Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

7 participants