DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

How I can get products using multiple skus?

As I ask upon:
https://magento.stackexchange.com/q/369468/113388

I have a list of skus:

  $skus = ['24-MB01','24-MB04','24-UG01'];
Enter fullscreen mode Exit fullscreen mode

And based on these I want to retrieve the products:

/**
 * @var \Magento\Catalog\Model\ProductRepository
 */
private $productRepository
...
$this->productRepository->addFieldToFilter('sku',$skus);
Enter fullscreen mode Exit fullscreen mode

But I cannot get them. Do you have any idea on how I can do this?

Top comments (0)