24 votes
Accepted

Open category filters by default in Magento 2

Just copy vendor\magento\theme-frontend-luma\Magento_LayeredNavigation\templates\layer\view.phtml into app\design\frontend\<your_company>\<your_theme>\Magento_LayeredNavigation\templates\...
user avatar
  • 387
5 votes
Accepted

Hide category from top navigation but show in side navigation?

If you are attempting this on ce-1.7 or later this can be done easily. Here is how I would do it. I would create a new category attribute (yes/no) called include_in_top_nav. Then override the ...
user avatar
  • 195k
3 votes

Speed up layered navigation filter in Magento

For each attribute you have in Magento and that is marked as filtrable, it will make a call to getAllOptions() of attribute source model. Even if there is no filter results for it, it will invoke ...
user avatar
  • 6,490
2 votes
Accepted

How can i call attribute filters in magento catelog page

I would advice you to add the layered view using the layout XML's instead of injecting the block directly. Also, adding 2 or more of this block in one page might cause issues. Make sure your ...
user avatar
  • 37.4k
2 votes

Magento2: Products group by filterable attributes

You can get lsit of filters from \Magento\Catalog\Model\Layer\FilterList::getFilters(). Then you get array of all filters represented by objects extending from \Magento\Catalog\Model\Layer\Filter\...
user avatar
2 votes
Accepted

error in catalog view layered navigation filter

check the xml for duplicate catalogsearch.leftnav block
user avatar
2 votes

Retrieving Layered Navigation / Category Filters via REST API / Outside Magento 1.9?

Hi I Know it is a late reply but it may help some other magento api developers. protected function _create($data){ $typeid = $data['categoryId']; $userid = $data['userId']; $pagesize = $...
user avatar
2 votes

How to add layered Navigation filter as stock availability?

Please see this module on github: https://github.com/tzyganu/stock-filter "The extension adds a new filter in the layered navigation with 2 options: In stock and out of stock. This way the user can ...
user avatar
2 votes

Shop by filters

The order in which the elements appear on smaller devices is dictated by the order in which the HTML tags are placed in the template. Looking into the the 2columns-left.phtml template, we can see ...
user avatar
  • 2,087
1 vote

Product Filtering—all Products with attribute value based on the admin value name

If the only options you are going to have are Male and Female, and you need to be able to filter those by those values, you need to have them not depend on the environment. I mean, if you move your ...
user avatar
  • 195k
1 vote

Wrong price in url while using price filter - Magento 2

Price range 2-5 in url work like 2 <= price <5 so it is equivalent of 2 <= price <=4.99 that displayed on the page
user avatar
  • 20.1k
1 vote

Magento2 - How to hide price filter only in specific categories?

You can try using following code. I have created a plugin in custom module. app/code/Anshu/HideFilters/registration.php <?php use Magento\Framework\Component\ComponentRegistrar; ...
user avatar
  • 8,548
1 vote
Accepted

Filter in left layered navigation not showing in Fresh installed Magento1.9.2.4

Besides the attribute settings, you also need to check each category. I.E. the category needs to be anchored. While editing the category, go to the Display Settings tab and check that Is Anchor set ...
user avatar
  • 1,539
1 vote

strlen() issue in layered navigation

Not really an answer, just to long for a comment (will be deleted) As @Keyur Shah said _getOptionText($optionId) should return a string or false, but it seems to be possible to get an array ... ...
user avatar
  • 11.5k
1 vote

strlen() issue in layered navigation

I don't think so it's array because when you look at the line $text = $this->_getOptionText($filter); It calls the /** * Get option text from frontend model by option id * * @...
user avatar
  • 17.4k
1 vote

How to hide SORT BY PRICE and PRICE FILTER NAVIGATION LAYER for not login user in magento 1.9?

That filter is most likely in template\catalog\product\list\toolbar.phtml The code that is of interest to you is: <select onchange="setLocation(this.value)" title="<?php echo $this->__('...
user avatar
1 vote

Show all store categories in sidebar on product listing page

Add the below code in your theme’s catalog XML file like this: <reference name="left"> <block type="catalog/navigation" name="catalog.leftnav" template="catalog/navigation/my_left_nav....
user avatar
  • 7,336
1 vote

How to add filter option in product details page?

I managed to do the task by adding some code in to Custom Layout Update of the product. <reference name="left"> <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="...
user avatar
  • 2,567
1 vote

Layered navigation $_filter->getHtml() returns empty string

I would recommend that you enable Template Path Hints AND Add Block Names to Hints in the developer menu in the magento configuration. This can be seen if you select the website (not the default ...
user avatar
  • 111
1 vote

How can i call attribute filters in magento catelog page

$_item->getFilter()->getRequestVar()
user avatar
  • 11
1 vote
Accepted

Mirror Products Across Multiple Categories

You can rewrite the class app\code\core\Mage\Catalog\Model\Layer.php and adjust the method public function getCurrentCategory() { $category = parent::getCurrentCategory(); if ($category->...
user avatar
  • 6,490
1 vote

Subcategory filter showing (0) products even though there are many products

Just refresh your cache (System > Cache Management > Flush Management Cache
user avatar
1 vote

Subcategory filter showing (0) products even though there are many products

Log into the admin area, hover over catalog and select Manage Categories. First thing to check is that you have the correct Store View selected in the upper-left corner of the categories page. Next, ...
user avatar
  • 301
1 vote
Accepted

Check if page is filterable

The methods in your question are not working because by the time you call them Mage_Catalog_Block_Layer might be not yet instantiated. One dirty solution can be the following: if (count(...
user avatar
  • 11.5k
1 vote

Magento: Hiding and not counting out of stock in layered navigation

Yes, you can get Magento to do this, by tweaking the product attribute index so that the attribute (e.g. size) value (e.g. 37.5) is not stored against the configurable product if the simple product ...
user avatar
1 vote

checkboxes on layered navigation in the filter block

I override the code: app\design\frontend\base\default\template\catalog\layer\filter.phtml Please check my code in github: https://github.com/ronaldduque24/filter Thank you
user avatar
  • 131
1 vote

Magento Remove attribute filter from a category

The default filtering system cannot be set by category. An attribute can be filtered or not. Simple as that. If an attribute does not have values for any products in the current listing it will not ...
user avatar
  • 195k
1 vote

Why wasn't the Product Attributes Index Included in the Scheduled Updates in 1.13?

Magento implemented this, but they didn't finish the task until the release. This will be released with the next minor update. At least I expect that.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible