Questions tagged [addattributetofilter]
The addattributetofilter tag has no usage guidance.
4
questions with no upvoted or accepted answers
1
vote
2
answers
71
views
addAttributeToFilter for Multislect Attribute Update Query Magento 2
I have Multiselect product attribute and i want to filter product by that attribute.
Currently i am using below code,
$productCollection = $this->getLayer()->getProductCollection();
$...
0
votes
1
answer
67
views
Magento 2: addAttributeToFilter not working when filtering by ID
Exception #0 (Magento\Framework\Exception\LocalizedException): The "id" attribute name is invalid. Reset the name and try again.
Here is my code
...
\Magento\Catalog\Model\ResourceModel\...
0
votes
0
answers
66
views
Filter product collection with nested OR/AND statements
I want to make a query as below
WHERE manageStock = 0 OR (manageStock = 1 AND productStatus != 0) OR (manageStock = 1 AND backorderStatus = 1)
but I can't use $collection->getSelect()->where() ...
0
votes
1
answer
162
views
Magento 1.9 addAttributeToFilter() returning 0 products
I have the following code where i want product collection filtered with custom attribute.
typeid = $data['categoryId'];
$pagesize = $data['limit'];
$pageno = $data['page'];
Mage::app()-&...