controller/jobs/src/Controller/Jobs/Customer/Email/Watch/Standard.php
protected function getStockItems( \Aimeos\MShop\Context\Item\Iface $context, array $prodCodes, $stockType )
	{
		$stockManager = \Aimeos\MShop::create( $context, 'stock' );

		$search = $stockManager->createSearch( true );
		$expr = array(
			$search->compare( '==', 'stock.productcode', $prodCodes ),
			$search->compare( '==', 'stock.type', $stockType ),
			$search->combine( '||', array(
				$search->compare( '==', 'stock.stocklevel', null ),
				$search->compare( '>', 'stock.stocklevel', 0 ),
			)),
			$search->getConditions(),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 100000 ); // performance speedup

		return $stockManager->searchItems( $search );
	}
protected function getStockItems( \Aimeos\MShop\Context\Item\Iface $context, array $prodCodes, $stockType )
	{
		$stockManager = \Aimeos\MShop::create( $context, 'stock' );

		$search = $stockManager->createSearch( true );
		$expr = array(
			$search->compare( '==', 'stock.productcode', $prodCodes ),
			$search->compare( '==', 'stock.type', $stockType ),
			$search->combine( '||', array(
				$search->compare( '==', 'stock.stocklevel', null ),
				$search->compare( '>', 'stock.stocklevel', 0 ),
			)),
			$search->getConditions(),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 100000 ); // performance speedup

		return $stockManager->searchItems( $search );
	}
protected function getStockItems ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context , array $ prodCodes , $ stockType ) { $ stockManager = \ Aimeos \ MShop :: create ( $ context , 'stock' ) ; $ search = $ stockManager -> createSearch ( true ) ; $ expr = array ( $ search -> compare ( '==' , 'stock.productcode' , $ prodCodes ) , $ search -> compare ( '==' , 'stock.type' , $ stockType ) , $ search -> combine ( '||' , array ( $ search -> compare ( '==' , 'stock.stocklevel' , null ) , $ search -> compare ( '>' , 'stock.stocklevel' , 0 ) , ) ) , $ search -> getConditions ( ) , ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; $ search -> setSlice ( 0 , 100000 ) ; // performance speedup return $ stockManager -> searchItems ( $ search ) ; }
Returns the stock items for the given product codes

@param \Aimeos\MShop\Context\Item\Iface $context Context item object
@param array $prodCodes List of product codes
@param string $stockType Stock type code
Returns the stock items for the given product codes