Skip to content

magento/magento2#25933 : Single Store Mode- Incorrect scope values us… #30394

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

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from

Conversation

sanjay-magecomp
Copy link

we have resolve this issue : #25933

Preconditions (*)
Magento 2.3.3 CE & 2.4-develop with sample data
Magento Instance should have one Website, Store and Store View only.
Steps to reproduce (*)

  1. Under Default Config, Navigate to Stores > Settings > Configuration > Catalog > Catalog
  2. Change the values of field Products per Page on Grid Allowed Values from 9,15,30 to 5,10,20,40,80 (Uncheck Use System value checkbox if ticked - optional)
  3. Change the values of field Products per Page on Grid Default Value from 9 to 10 (Uncheck Use System value checkbox if ticked- optional)
  4. Click on Save Config
  5. Clear the cache if prompted to refresh the cache
  6. Switch the scope from Default Config to Default Store View Scope from the drop-down showing on upper-left corner
  7. Navigate to Stores > Settings > Configuration > Catalog > Catalog
  8. From Default Store View Scope, Uncheck Use Website checkbox for following fields
    . Products per Page on Grid Allowed Values
    . Products per Page on Grid Default Value
  9. Change the values of field Products per Page on Grid Allowed Values to 30,60,90
  10. Change the values of field Products per Page on Grid Default Value to 30
    Click on Save Config
  11. Switch the scope to Default Config from Default Store View Scope
  12. From Default Config Scope, Set Enable Single-Store Mode to Yes
  13. Click Save Config
  14. Clear all the cache
  15. Now, Navigate to Stores > Settings > Configuration > Catalog > Catalog
  16. Tries to update the values for following fields.
  17. Products per Page on Grid Allowed Values 20,40,60
    .Products per Page on Grid Default Value 20
    19.Save Config and Clear all the cache
    20.Open any category page to see the Show per page values.

Expected result (*)
On category page, it should show 20,40,60 in the Show per page drop-down.
Actual result (*)
On category page, it shows values as 30,60,90 in the Show per page drop-down.

Description
showing correct pagination based on system configurations.

Fixed Issues

  1. Fixes Single Store Mode- Incorrect scope values using at Storefront for Catalog Section #25933

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 10, 2020

Hi @sanjay-magecomp. Thank you for your contribution
Here is 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

❗ 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests 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 Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@sanjay-magecomp
Copy link
Author

#dmcdindia2020

@sanjay-magecomp
Copy link
Author

@magento give me test instance - deploy test instance based on PR changes

@magento-deployment-service
Copy link

Hi @sanjay-magecomp. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@pramod-mishra
Copy link

pramod-mishra commented Oct 10, 2020

#dmcdindia2020

@pramod-mishra
Copy link

@magento give me test instance

@magento-deployment-service
Copy link

Hi @pramod-mishra. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@yogeshkhasturi
Copy link

#dmcdindia2020

@magento-engcom-team
Copy link
Contributor

@yogeshkhasturi thank you for joining. Please accept team invitation here and self-assign the issue.

@sivaschenko sivaschenko added Priority: P3 May be fixed according to the position in the backlog. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Oct 10, 2020
@sanjay-magecomp
Copy link
Author

@magento run all tests

Comment on lines +129 to +132
$scope=ScopeInterface::SCOPE_STORE;
if($this->scopeConfig->getValue('general/single_store_mode/enabled', ScopeConfigInterface::SCOPE_TYPE_DEFAULT)) {
$scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$scope=ScopeInterface::SCOPE_STORE;
if($this->scopeConfig->getValue('general/single_store_mode/enabled', ScopeConfigInterface::SCOPE_TYPE_DEFAULT)) {
$scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT;
}
$scope = $this->scopeConfig->getValue(\Magento\Store\Model\StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED)
? ScopeConfigInterface::SCOPE_TYPE_DEFAULT
: ScopeInterface::SCOPE_STORE;

@Bashev
Copy link
Contributor

Bashev commented Sep 1, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Event: dmcdindia2020 Priority: P3 May be fixed according to the position in the backlog. Progress: pending review Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single Store Mode- Incorrect scope values using at Storefront for Catalog Section
7 participants