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\...
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 ...
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 ...
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 ...
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\...
2
votes
Accepted
error in catalog view layered navigation filter
check the xml for duplicate catalogsearch.leftnav block
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 = $...
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 ...
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 ...
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 ...
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
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;
...
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 ...
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 ...
...
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
*
* @...
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->__('...
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....
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="...
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 ...
1
vote
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->...
1
vote
Subcategory filter showing (0) products even though there are many products
Just refresh your cache (System > Cache Management > Flush Management Cache
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, ...
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(...
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 ...
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
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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
filtered-nav × 43layered-navigation × 20
filter × 14
magento-1.9 × 13
attributes × 7
category × 6
magento-1.8 × 5
collection × 5
magento2 × 4
magento2.3 × 2
product-attribute × 2
price × 2
ajax × 2
navigation × 2
sidebar × 2
magento-1.7 × 1
module × 1
javascript × 1
api × 1
theme × 1
catalog × 1
products × 1
rest × 1
search × 1
catalogsearch × 1