Questions tagged [layer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Magento 2 add query to custom url

I'm working with multiple checkboxes of layered navigation. I have to use mail category Id to pass active and clicked params as a filter to URL. In my plugin I override getUrl like this. public ...
1
vote
1answer
139 views

After update Magento 2.3.5 to 2.4.2 on all category pages error: Exception #0 (RuntimeException): Catalog Layer has been already created. How fix?

After updating the version, I started getting on all category pages this error: Exception #0 (RuntimeException): Catalog Layer has been already created This is error in: vendor/magento/module-catalog/...
0
votes
0answers
22 views

Combine Layered Navigation and search by name

I am trying to add a searchbox on my category pages that my users can use to filter (by name) the products in category that they are looking at. It should also work with already existing filters that'...
0
votes
1answer
244 views

Magento 2.3 How to show Out of Stock Products only in Search?

My site is supposed to show out of stock products in some places in the catalogue, so the Catalog > Inventory > Display Out of Stock Products setting is set to "Yes." But I do not want ...
1
vote
2answers
115 views

Magento2.3.1 How to overide Model file?

I am using Magento2.3.1 and i trying to override model in our theme. our model file path app/code/XXXX/General/Model/Layer <?php namespace XXXXX\General\Model\Layer; class FilterList extends \...
0
votes
0answers
63 views

How to Filter Current Category Layer's products colletions by instock and qty greater than zero(0) condition in List Page Magento 2

Please check below Code: di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/...
0
votes
1answer
250 views

Filter Price now showing on multiple websites using elastic search 6 +

Currently after 2.3.1 magento upgrade I start to use elastic search 6. On my magento application i have multiple websites and for some reason, except the default website the price filter was not ...
0
votes
1answer
250 views

Could not filter product collection in Mage_Catalog_Block_Product_List by a custom attribute in magento 1.9

I have an issue similar to this question , and i checked the 'Already answered link' too. But my issue is bit different. The error is similar in the above link but with my custom attribute : ...
1
vote
0answers
14 views

Custom Layer with custom template

I would like to create a custom layer to filter products by price. This specific layer should therefore have a dedicated, specific TPL, which is the best way to do it?
1
vote
1answer
989 views

Magento 2 Equivalent for Mage::getModel('catalog/layer')

For Magento1, On:- app/design/frontend/Mypackage/Mytheme/template/catalog/product/view.phtml I'm using following code:- Mage::getModel('catalog/layer')->getCurrentCategory()->getId() Same code I ...
0
votes
1answer
191 views

Get collection of filtered products (layered navigation)

I am trying to get a collection of products according to filters applied in layered navigation. I thought, that layer model's getProductCollection will do it for me, but as long as i see, it ...
1
vote
0answers
45 views

How to do Progressive Image? [closed]

My website loading image like, How can i change to, Anyone help me, Thanks.
4
votes
0answers
421 views

Override core model not working

I tried to override Magento core model which located in vendor/magento/module-catalog/Model/Layer.php, but it doesn't work at all, here's my code: app/code/Vendor/Module/etc/di.xml <preference ...
0
votes
1answer
39 views

Magento2: Equivalent catalogsearch/layer getFilterableAttributes

What is the equivalent in magento2 of $query = Mage::getModel('catalogsearch/layer'); $filterableAttributes = $query->getFilterableAttributes();
1
vote
0answers
675 views

Magento2: Search products using filterable Attributes

I'm trying to make a product search engine and i need add a filter attribute option. (i am using \Magento\Catalog\Model\Layer\Category\FilterableAttributeList) i obtain the list of attributes $...
2
votes
2answers
472 views

Magento2: Add pricing logic layer at the end

Before moving to Magento, I had a princing logic inside a table that involved (customer, customer group, item, item group, etc) There are some native features that I will take advantage of such as ...
2
votes
0answers
115 views

Digital Data Layer

I need to implement digital data layer for marketing. I already tried this tool https://github.com/digitalDataLayer/magento2 but this produce error. So I am looking for help.
0
votes
1answer
162 views

How to remove Quote Marks From Product Name

I'm need to remove the quote marks from the product name because it is messing up the Data Layer. $product['name'] = $item->getName(); How can I do it in the above code? Thanks
0
votes
1answer
163 views

Layer Navigation on attribute

I want to display color,fabric,size,discount,Brand search/Filter options in products page. So customer can search a tshirt like color-Blue,Fabric-Cotton,Size-XL,Discount 50-60%,Brand-Pepe. How to ...
12
votes
3answers
3k views

Magento 1.9.2 Add layer navigation to advance search

I have followed following 3 steps for advanced search layer navigation, but it is not working. Any idea/suggestion OR How to implement layer navigation in advanced search? 1) In our local.xml under ...
1
vote
1answer
711 views

get min/max value from active filters

I'm getting my active filters like this: $filters = Mage::getSingleton('catalog/layer')->getState()->getFilters(); When $filters[0]->debug() I can tell the information I want, min/max ...
7
votes
2answers
1k views

Get empty result when trying to get filterable attribute for particular category

I need to retrieve all filterable attributes for category. I'm using that snippet: $category = Mage::getModel('catalog/category')->load($categoryId); $layer = Mage::getModel('catalog/layer'); $...
3
votes
0answers
635 views

Layered Navigation for Custom Product Collection filtered via Custom Attribute [duplicate]

I have a filtered product collection using custom attribute. How do I implement layered navigation for the same? I have extended Mage_Catalog_Block_Product_List in my block to and override ...
1
vote
1answer
505 views

Removing Item from collection and update toolbar - [Hide out of stock item in layer navigation ( configurable )]

I'm trying to hide out of stock products in layer navigation. This can be done using this code: http://colin.mollenhour.com/2009/07/14/hiding-out-of-stock-items-in-layered-navigation/ The issue is ...