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

[Bug] REST API: Update special prices does not set values for all store views #39521

Open
1 of 5 tasks
JoryHogeveen opened this issue Jan 5, 2025 · 5 comments
Open
1 of 5 tasks
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Reported on 2.4.7-p3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@JoryHogeveen
Copy link

Preconditions and environment

  • Magento versionL 2.4.7-p3
  • Anything else that would help a developer reproduce the bug

Steps to reproduce

  1. Create multiple websites and storeviews
  2. Use de REST API to update a special price for a website (any store view ID)
  3. Verify change, you'll see that only the storeview for the ID you passed is updated and Magento does not override the settings for the other storeviews, these are still on "Use Default Value".

Expected result

Since the special pricing attributes are in website scope, I would expect all store views to be updated, not just the single ID passed in the endpoint.

Actual result

The special price values are only updated for the store view ID that is provided through the payload, all the other storeviews are not synced.
I consider this a bug since the default Magento 2 admin handles this automatically. When you change the value for an attribute in the website scope, all other storeviews are also updated. IMO the REST API should behave the same.

Additional information

No response

Release note

This bug enforces anyone using the REST API to provide the special price for ALL storeviews in that website, which is hugely redundant and also enforces an extra REST API call to get these IDs.
Special prices are critical data since incorrect values could result in invalidly priced orders.
Therefore I set this to S1 severity.

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Jan 5, 2025

Hi @JoryHogeveen. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues 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.

@github-project-automation github-project-automation bot moved this to Ready for Confirmation in Issue Confirmation and Triage Board Jan 5, 2025
@JoryHogeveen JoryHogeveen changed the title Update special prices does not set values for all store views [Bug] REST API: Update special prices does not set values for all store views Jan 5, 2025
@engcom-Bravo engcom-Bravo added the Reported on 2.4.7-p3 Indicates original Magento version for the Issue report. label Jan 6, 2025
@engcom-Hotel engcom-Hotel self-assigned this Jan 9, 2025
Copy link

m2-assistant bot commented Jan 9, 2025

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

Hello @JoryHogeveen,

Thanks for the report and collaboration!

We have tried to reproduce this issue in the latest development branch i.e. 2.4-develop and the issue seem reproducible for us.

Below steps we followed to reproduce the issue:

  1. Go to Stores -> Configuration -> Catalog -> Catalog -> Price and update Catalog Price Scope as Website.
  2. Create multiple websites, stores, and storeviews.
  3. Edit any product, and choose the scope (We chose Spanish):
    image
  4. Click on Advanced Pricing and add a special price for the product.
  5. Save the product. This will also update the special price for the Spanish 2 store.
  6. But if we use rest API as below:
http://local.magentoissues.com/rest/all/V1/products/special-price
{
  "prices": [
    {
      "price": 200,
      "store_id": 2,
      "sku": "product_dynamic_1"
    }
  ]
}
  1. It is updating only for the mentioned store id. but it should update for all stores under that website.

Hence confirming the issue.

Thanks

@engcom-Hotel engcom-Hotel added Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Area: Catalog and removed Issue: ready for confirmation labels Jan 9, 2025
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-13671 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Jan 9, 2025

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Reported on 2.4.7-p3 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Status: Ready for Grooming
Development

No branches or pull requests

4 participants