Guest User

Untitled

a guest
Feb 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /**
  2. * @param array $skus
  3. * @param array|string $attributes
  4. *
  5. * @return MagentoCatalogModelResourceModelProductCollection
  6. */
  7. public function getProductsWithStock($skus, $attributes = '*')
  8. {
  9. /** @var MagentoCatalogModelResourceModelProductCollection $products */
  10. $products = $this->productCollection->clear()
  11. ->addAttributeToFilter(
  12. 'sku',
  13. [
  14. 'in' => $skus
  15. ]
  16. )
  17. ->addAttributeToSelect($attributes);
  18.  
  19. return $products;
  20. }
Add Comment
Please, Sign In to add comment