controller/common/src/Controller/Common/Product/Import/Csv/Cache/Product/Standard.php
public function get( $code, $type = null )
	{
		if( isset( $this->prodmap[$code] ) ) {
			return $this->prodmap[$code];
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'product.code', $code ) );

		$result = $manager->searchItems( $search );

		if( ( $item = reset( $result ) ) !== false )
		{
			$this->prodmap[$code] = $item->getId();
			return $this->prodmap[$code];
		}
	}
public function get( $code, $type = null )
	{
		if( isset( $this->prodmap[$code] ) ) {
			return $this->prodmap[$code];
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'product.code', $code ) );

		$result = $manager->searchItems( $search );

		if( ( $item = reset( $result ) ) !== false )
		{
			$this->prodmap[$code] = $item->getId();
			return $this->prodmap[$code];
		}
	}
public function get ( $ code , $ type = null ) { if ( isset ( $ this -> prodmap [ $ code ] ) ) { return $ this -> prodmap [ $ code ] ; } $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'product' ) ; $ search = $ manager -> createSearch ( ) ; $ search -> setConditions ( $ search -> compare ( '==' , 'product.code' , $ code ) ) ; $ result = $ manager -> searchItems ( $ search ) ; if ( ( $ item = reset ( $ result ) ) !== false ) { $ this -> prodmap [ $ code ] = $ item -> getId ( ) ; return $ this -> prodmap [ $ code ] ; } }
Returns the product ID for the given code

@param string $code Product code
@param string|null $type Attribute type
@return string|null Product ID or null if not found
Returns the product ID for the given code