I'm getting all products with this code:


and also I added this code to get products with "size" attribute.

->addAttributeToFilter('size', '13')

And now, I'm asking how can I do that with array. I mean getting products value of size = 13,14,15 like array


make an array

$size= array(13,14,15);

and call in array,

$this->_productCollection->addAttributeToFilter('size', array('in'=>$size));

this may help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.