controller/common/src/Controller/Common/Common/Import/Xml/Processor/Lists/Product/Standard.php
protected function getItems( \DomNodeList $nodes )
	{
		$codes = $map = [];
		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );

		foreach( $nodes as $node )
		{
			if( $node->nodeName === 'productitem' && ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) {
				$codes[$attr->nodeValue] = null;
			}
		}

		$search = $manager->createSearch()->setSlice( 0, count( $codes ) );
		$search->setConditions( $search->compare( '==', 'product.code', array_keys( $codes ) ) );

		foreach( $manager->searchItems( $search, [] ) as $item ) {
			$map[$item->getCode()] = $item;
		}

		return $map;
	}
protected function getItems( \DomNodeList $nodes )
	{
		$codes = $map = [];
		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );

		foreach( $nodes as $node )
		{
			if( $node->nodeName === 'productitem' && ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null ) {
				$codes[$attr->nodeValue] = null;
			}
		}

		$search = $manager->createSearch()->setSlice( 0, count( $codes ) );
		$search->setConditions( $search->compare( '==', 'product.code', array_keys( $codes ) ) );

		foreach( $manager->searchItems( $search, [] ) as $item ) {
			$map[$item->getCode()] = $item;
		}

		return $map;
	}
protected function getItems ( \ DomNodeList $ nodes ) { $ codes = $ map = [ ] ; $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'product' ) ; foreach ( $ nodes as $ node ) { if ( $ node -> nodeName === 'productitem' && ( $ attr = $ node -> attributes -> getNamedItem ( 'ref' ) ) !== null ) { $ codes [ $ attr -> nodeValue ] = null ; } } $ search = $ manager -> createSearch ( ) -> setSlice ( 0 , count ( $ codes ) ) ; $ search -> setConditions ( $ search -> compare ( '==' , 'product.code' , array_keys ( $ codes ) ) ) ; foreach ( $ manager -> searchItems ( $ search , [ ] ) as $ item ) { $ map [ $ item -> getCode ( ) ] = $ item ; } return $ map ; }
Returns the product items for the given nodes

@param \DomNodeList $nodes List of XML product item nodes
@return \Aimeos\MShop\Product\Item\Iface[] Associative list of product items with codes as keys
Returns the product items for the given nodes