Skip to content

Incorrect Scope Assigned to Price Attributes at Creation #39986

Open
@Varshal24

Description

@Varshal24
Contributor

Preconditions and environment

  • Magento version: 2.4.6, 2.4.7, 2.4.8

Description (*)

So, in Magento 2, when you create a custom attribute of type Price, it automatically gets the Store View scope by default. We can notice this either in the database or when looking at the attribute grid (Screenshot 2). While creating the price attribute, Magento doesn’t give any option to change the scope manually.

There is a setting in the admin panel under Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope (Screenshot 3), where we can set whether prices should be scoped globally or by website. Logically, we expect any new price attribute to automatically pick up whatever is set there. But it doesn’t work that way.

If you create a price attribute, Magento will still assign it the Store View scope. However, if you go into that configuration and simply click Save (even without changing anything), and then check the scope of the newly created attribute, it will now be set according to the configuration. So basically, unless you save the price scope setting at least once, Magento doesn't apply it to new price attributes. That inconsistency can be a problem because it creates mismatches in how price data is handled, especially across different store views or websites.

(Note: If we assign this attribute to a product or use it elsewhere, it will follow the scope defined in the configuration. That’s why this issue hasn’t been noticed until now.)

Screenshot 1:
Image

Screenshot 2:
Image

Screenshot 3:
Image

Steps to reproduce

  1. Navigate to Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope and set the value to either Website or Global.
  2. Create a new custom attribute of type Price.
  3. Check the attribute scope in the admin grid or directly in the database (It will be Store View).

Expected result

The price attribute scope should match the value set in the configuration: Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope either Website or Global).

Actual result

When a price attribute is created and saved for the first time, its scope is incorrectly set to Store View, regardless of the configured setting.

Additional information

No response

Release note

No response

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”.

Activity

m2-assistant

m2-assistant commented on Jun 12, 2025

@m2-assistant

Hi @Varshal24. 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.

m2-assistant

m2-assistant commented on Jun 12, 2025

@m2-assistant

Hi @engcom-November. 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-November

engcom-November commented on Jun 12, 2025

@engcom-November
Contributor

Hello,

Thank you for your report and collaboration.

We attempted to reproduce the issue on our latest Magento 2.4-develop instance, and we were able to successfully replicate the behavior you've described. Please refer to the attached screenshot for reference.

Image
Image

Steps to Reproduce:

  • Navigate to Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope, and set the value to either Website or Global.
  • Create a new custom product attribute of type Price.
  • Check the attribute scope in the admin grid or directly in the database — the scope is still set to Store View.

Following the provided preconditions and reproduction steps, we encountered the same issue.

Therefore, we are marking this as: Issue: Confirmed.

Thank you once again for your valuable contribution!

github-jira-sync-bot

github-jira-sync-bot commented on Jun 12, 2025

@github-jira-sync-bot

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

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: PricingComponent: AttributesIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.6Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @engcom-Bravo@engcom-November@github-jira-sync-bot@Varshal24

      Issue actions

        Incorrect Scope Assigned to Price Attributes at Creation · Issue #39986 · magento/magento2