In product collection, I want to do like :
$productCollection = $this->productCollectionFactory->create(); $productCollection->addCategoriesFilter(['in' => $catalog_id])->addAttributeToSelect('*'); $productCollection->addAttributeToFilter('color', ['eq' => 2650]); $productCollection->addAttributeToFilter('size', ['eq' => 10]);
This above code working properly. But, my attribute collection will be dynamically. So, I want to do like just single addAttributeToFilter and this both filter apply.
How to do that?
Any help would be appriciated.