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

Fixed anchor categories showing products of disabled subcategories #9002 #14320

Closed
wants to merge 1 commit into from

Conversation

drashmk
Copy link

@drashmk drashmk commented Mar 24, 2018

Description

Incomplete query for the temporary table temp_catalog_category_tree_index_xxxx was causing products of disabled subcategories to be visible on anchor categories. It was missing the check for is_active category attribute on the child category when creating the temporary category.

Fixed Issues (if relevant)

#9002: Anchor categories are showing products of disabled subcategories

Manual testing scenarios

  1. Create a simple product 'Test' that is in stock and visible on catalog
  2. Create a category A (don't add products to it)
  3. Create a subcategory B (parent is A) and add our 'Test' product to it
  4. Goto category A on frontend
  5. 'Test' product is not visible in category A

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 on Travis CI are green)

Copy link
Contributor

@sidolov sidolov left a comment

Choose a reason for hiding this comment

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

Please, cover provided changes at least by unit test

* @return string
* @since 101.0.0
*/
protected function makeTempCategoryTreeIndex()
protected function makeTempCategoryTreeIndex(\Magento\Store\Model\Store $store)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't add/remove any parameters to public and protected method, please, use guide for backward compatible developpmenet

* @param string $temporaryName
* @since 101.0.0
*/
protected function fillTempCategoryTreeIndex($temporaryName)
protected function fillTempCategoryTreeIndex($temporaryName, \Magento\Store\Model\Store $store)
Copy link
Contributor

Choose a reason for hiding this comment

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

See previous comment

@sidolov
Copy link
Contributor

sidolov commented Apr 10, 2018

@drashmk , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for collaboration

@sidolov sidolov closed this Apr 10, 2018
@magento-engcom-team
Copy link
Contributor

Hi @drashmk. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants