Thats one my attributes that should be visible in layered navigation:

 $eavSetup->removeAttribute(Product::ENTITY, 'supported_software');
                'type' => 'text',
                'input' => 'multiselect',
                'frontend_class' => 'required-entry',
                'label' => 'Supported software',

                'group' => 'Technical parameters',
                'sort_order' => 190,

                'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
                'frontend' => '',
                'source' => '[vendor]\DbSchema\Model\SupportedSoftware\Adminhtml\Source\SupportedSoftware',

                'default' => 10,

                'is_wysiwyg_enabled' => false,
                'is_html_allowed_on_front' => false,

                'used_for_sort_by' => false,

                'global' => ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' => true,
                'required' => true,
                'user_defined' => true,

                'searchable' => false,
                'visible_in_advanced_search' => false,

                'search_weight' => '',
                'filterable' => true,
                'filterable_in_search' => true,
                'comparable' => true,
                'visible_on_front' => true,
                'used_in_product_listing' => true,
                'unique' => false,
                'apply_to' => 'downloadable,bundle',
                'is_used_for_promo_rules' => true,

                'is_used_in_grid' => false,
                'is_visible_in_grid' => false,
                'is_filterable_in_grid' => false,

                'is_required_in_admin_store' => '',

                'system' => 0,

Moreover this attribute has digit values for admin store and varchar values for frontend (default store view). But I don't think it is the problem here. Layered navigation appears on frontend properly. I have in db about 40 products added programatically (tests) and all of them should have some values of this attribute (I am adding these values for admin - but for frontend are being added simultanously). Sometimes my attributes shows up in layered navigation but sometimes not. If I add product from adminhtml manually values its values appears in layered navigation, but they erase former values. For example - if I have 10 product with values x and 10 with values y and I add product with value z in layered navigation after reindex/cache flush only appears results for only one product with value z.

All of my categories are anchored.

EDIT: Some attributes - escpecially the ones which have source model Yes/No in fact appear in lay nav in correct way and also react on changes of values of attributes properly.

EDIT: The same attribute if I added source model instead of options still doesn't appear in lay nav.

  • Is data loaded for layered navigation being saved in db somewhere or it's rather cached or what? – Bartosz Kubicki Jul 5 '16 at 10:30
  • We had a similar issue some time ago. We would suggest you to check the eav_attribute and catalog_eav_attribute tables and compare "regular" Magento attributes with the attributes you have created programmatically. There can be a difference that gives you such results. – Neklo.com Jul 13 '16 at 13:36

I wonder if being searchable is not a requirement if you want the attribute to be filterable.

What engine are you using ?

|improve this answer|||||
  • engine? I use Magento 2.1 and php 7.0 – Bartosz Kubicki Jul 14 '16 at 8:23
  • I mean what search engine MySQL, SolR, ES ? Is the missing attribute searchable ? – Aurélien FOUCRET Jul 14 '16 at 11:07
  • I was testing it with many setting, also searchable but in my opinion it doesn't matter. – Bartosz Kubicki Jul 14 '16 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.