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

Problem showing configurable items correctly #20

Open
brosenberger opened this issue Sep 19, 2018 · 1 comment
Open

Problem showing configurable items correctly #20

brosenberger opened this issue Sep 19, 2018 · 1 comment

Comments

@brosenberger
Copy link

Precondition

  • additionally module https://github.com/karliuka/m2.SmartCategoryConfigurable installed
  • create category with special price filter and option replace on configurable set to true
  • create a configurable (visibility catalog, search) with multiple configurated simple products (visibility individually not visible)

Action

  • add special price for one of the simple products of the configurable

Expected

  • the configurable product is shown in the given smart category in the frontend

Result

  • the configurable product is not shown in the given smart category

Current findings

  • within the catalog_product_category table only the simple product is added to the smart category and therefor the normal category_product_indexer does not add it to the index as the simple product is not visible individually
  • the arrays $postedProducts and $matchingProducts (\Faonni\SmartCategory\Model\Indexer\IndexBuilder::updateRuleProductData) differ but deleteIds and insertIds are both empty to due the array_diff method (both product arrays have the following structure: [productId1 => 1, productId2 => 1, ... ]. Therefore i think the correct solution would be to change the php method array_diff with array_diff_key to gain the differences in both arrays in
    $deleteIds = array_diff($postedProducts, $matchingProducts);
    but i am not quite sure if the current check was intentional
@pinguluk
Copy link

pinguluk commented Feb 28, 2019

I see that he made an extension for that:
https://github.com/karliuka/m2.SmartCategoryConfigurable

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

No branches or pull requests

2 participants