Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param array $skus
- * @param array|string $attributes
- *
- * @return MagentoCatalogModelResourceModelProductCollection
- */
- public function getProductsWithStock($skus, $attributes = '*')
- {
- /** @var MagentoCatalogModelResourceModelProductCollection $products */
- $products = $this->productCollection->clear()
- ->addAttributeToFilter(
- 'sku',
- [
- 'in' => $skus
- ]
- )
- ->addAttributeToSelect($attributes);
- return $products;
- }
Add Comment
Please, Sign In to add comment