-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Attribute Indexing ignores custom source model options #417
Comments
This is exactly the issue I've faced about a year ago and solved it in a similar (albeit a bit dirtier approach) but this is something bothers me still. Thank you for the good description of the issue I wonder if this can be solved even more elegantly without changing core files by implementing own indexer or the indexing should be improved in the core. @IvanChepurnyi can you advise please? |
@simonspoerri found my SO thread regarding the issue http://stackoverflow.com/questions/7597448/multi-select-filter-in-layered-navigation/ @mage2-team any insight on this? Thank you |
@Zifius, sorry i didn't attach the following link, http://www.magestore.com/magento/multi-select-filter-in-layered-navigation.html/, upon which my suggestion is based. Thanks for your help on this! |
@simonspoerri looks like that site just aggregated my answer on SO which is the origin |
@simonspoerri Thank you for reporting the issue and sorry for so biiiiig delay. Internal reference: MAGETWO-33570 |
Hello @kokoc, did you plan a similar fix for Magento 1 ? I'm currently on EE 1.14 and iI have this bug too (class Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source). |
Thank you for your submission. We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues. Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here). We are closing this GitHub ticket and have moved your request to the new forum. |
Bug MAGETWO-58373 Set return code for SetModeCommand [GITHUB PR#4845] MAGETWO-58372 Added 'target' attribute to the allowed attributes array for link block [GITHUB PR#1935] MAGETWO-56552 [GITHUB PR#4733] Escape Js Quote for layout updates MAGETWO-58369 [GITHUB PR#4733] Update Container.php [GITHUB PR#4565]
This is a bug, not a feature request - one documented feature does not work with another documented feature. Please could we have an update on MAGETWO-33570? |
Update to the previously suggested code - this works if added at around line 246 of magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php
I'm not sure if there is a better method for creating instances of the source class without the overhead of loading all the attributes, but this does fix the issue. |
If you are using the above for a temp fix, obviously use DI to create a preference for \Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav\Source and override just the _prepareMultiselectIndex method. |
@maderlock This fix does not work with custom source that has varchar values. it causes an integrity constraint on reindex. With integer values, it's ok. |
@maderlock: thanks for that fix. I packaged it up, here: https://github.com/SwiftOtter/AttributeIndexFix |
Any update on this? I note that 2.1.8 has no fix for this. |
Hi @simonspoerri. Thank you for your report.
The fix will be available with the upcoming 2.3.1 release. |
Is this one going to be applied to the 2.2-develop line? I see PR #16727 but it doesn't seem to have commits. 2.2.7 doesn't seem to have any changes to |
…ngMethod.amount #417 - Merge Pull Request magento/graphql-ce#417 from XxXgeoXxX/graphql-ce:2.3-devlop#402 - Merged commits: 1. 5bbb8bb
Accepted Public Pull Requests: - #21785: [Forwardport] [Checkout] Fix clearing admin quote address when removing all items (by @eduard13) - #21469: Update price-bundle.js so that correct tier price is calculated while displaying in bundle product (by @adarshkhatri) - #21751: fix #21750 remove translation of product attribute label (by @Karlasa) - #21774: MSI: Add deprecation message to CatalogInventory SPIs (by @lbajsarowicz) - #21575: Fix for issue #21510: Can't access backend indexers page after creating a custom index (by @ccasciotti) - #21288: #12396: Total Amount cart rule without tax (by @AleksLi) - magento-commerce/magento-functional-tests-migration#679: #417 Removed unnecessary default values in action groups (by @hws47a) - magento-commerce/magento-functional-tests-migration#678: Convert FlushStaticFilesCacheButtonVisibilityTest to MFTF (by @Leandry) - magento-commerce/magento-functional-tests-migration#676: Convert VerifyDisabledCustomerGroupFieldTest to MFTF #664 (by @Michalk39) Fixed GitHub Issues: - #21467: Tier price of simple item not working in Bundle product (reported by @adarshkhatri) has been fixed in #21469 by @adarshkhatri in 2.3-develop branch Related commits: 1. caabef2 2. 4c1c653 3. d4dd2e6 4. e7589ad 5. 6f49b07 6. 0332391 - #21750: Product attribute labels are translated (reported by @Karlasa) has been fixed in #21751 by @Karlasa in 2.3-develop branch Related commits: 1. a07eda3 - #21510: Can't access backend indexers page after creating a custom index (reported by @ccasciotti) has been fixed in #21575 by @ccasciotti in 2.3-develop branch Related commits: 1. 318425f 2. 486e21c 3. 409e00e 4. 0acd6b6 - #12396: "Total Amount" cart rule without tax (reported by @Chei20) has been fixed in #21288 by @AleksLi in 2.3-develop branch Related commits: 1. 6ae859a 2. c25656b 3. 23ed015 4. e9389ee 5. 571f055
…in-session CABPI-290: prolong admin session if access token is valid
Currently The indexing of Attribute Values used for the product filters in the category overview only index multiselect attributes that use attribute options. If a custom source model is specified the values are not indexed and thus are not taken into account when filtering products.
To fix the issue in my case I created an interface which all Source Models that should be taken into account while indexing should implement. For Attributes implementing this interface not only attribute options from the DB are indexed but also all options provided by the source model.
the class in question is Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source . I've overridden the _prepareMultiselectIndex Method and added the following snippet after the attribute options are loaded from 'eav/attribute_option'
Maybe I'm misusing some principles here but I really think custom source model based multiselect attributes should be filterable as well, thus they need to be indexed...
The text was updated successfully, but these errors were encountered: