magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Item should be updated if there is a buyRequest

Open pmzandbergen opened this issue 3 years ago • 1 comments

Fixes #35907

pmzandbergen avatar Aug 10 '22 13:08 pmzandbergen

Hi @pmzandbergen. Thank you for your contribution Here are some useful tips how you can test your changes using Magento test environment. Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s) For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

:information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Aug 10 '22 13:08 m2-assistant[bot]

@magento run all tests

Den4ik avatar Aug 14 '22 13:08 Den4ik

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run Functional Tests EE

Den4ik avatar Aug 14 '22 18:08 Den4ik

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

https://github.com/magento run Functional Tests EE

Den4ik avatar Aug 15 '22 10:08 Den4ik

@magento run Functional Tests EE

Den4ik avatar Aug 18 '22 06:08 Den4ik

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run Functional Tests EE

Den4ik avatar Aug 19 '22 13:08 Den4ik

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

:heavy_check_mark: QA Passed

Preconditions: Install fresh Magento.

Manual testing scenario: 1.Create admin token using endpoint: /rest/default/V1/integration/admin/token/ Payload

{
"username": "admin",
"password": "admin@123"
}

Using admin token you can use in header as bearer token.

  1. Create a empty cart(post) in rest api endpoint: /index.php/rest/V1/guest-carts/ It will give you cart id in response

  2. Using post method add product to cart(configurable product): `/rest/V1/guest-carts/{cartid}/items Payload

{
"cartItem": {
"sku": "config_test",
"qty": 1,
"quote_id": "21",(take from DB)
"product_option": {
"extension_attributes": {
"configurable_item_options": [
{
"option_id": "93",
"option_value": 4
}
]
}
},
"extension_attributes": {}
}
}

In response you will get item id 4. Using put method update cart /rest/V1/guest-carts/RutltjLiQzylAEu8L1jsHBI7YS58qWp7/items/{itemid}

{
"cartItem": {
"sku": "config_test",
"qty": 1,
"quote_id": "21",
"product_option": {
"extension_attributes": {
"configurable_item_options": [
{
"option_id": "93",
"option_value": 5
}
]
}
},
"extension_attributes": {}
}
}

Before: :heavy_multiplication_x: Cart was not getting updated Screenshot from 2022-08-26 14-21-58

After: :heavy_check_mark: Cart items got updated. Screenshot from 2022-08-26 15-28-29

Hence, moving it to MIP

Thanks

engcom-Lima avatar Aug 26 '22 11:08 engcom-Lima

@pmzandbergen Could you please resolve merge conflict

Den4ik avatar Sep 08 '22 07:09 Den4ik

@Den4ik it seems @mahesh-singh-rajawat fixed it with AC-5986: https://github.com/magento/magento2/commit/eb02e7a4715169bc24261159da9bb0573fdb0ab2

I guess we could close this PR.

pmzandbergen avatar Sep 12 '22 08:09 pmzandbergen

@pmzandbergen Yep, it's already fixed. Thanks for your work

Den4ik avatar Sep 12 '22 12:09 Den4ik