protected function _checkCategory( $prodid )
	{
		$catalogListManager = MShop_Factory::createManager( $this->_getContext(), 'catalog/list' );

		$search = $catalogListManager->createSearch( true );
		$expr = array(
			$search->compare( '==', 'catalog.list.refid', $prodid ),
			$search->getConditions()
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 1 );

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

		if( reset( $result ) === false )
		{
			$msg = sprintf( 'Adding product with ID "%1$s" is not allowed', $prodid );
			throw new Controller_Frontend_Basket_Exception( $msg );
		}
	}
protected function _checkCategory( $prodid )
	{
		$catalogListManager = MShop_Factory::createManager( $this->_getContext(), 'catalog/list' );

		$search = $catalogListManager->createSearch( true );
		$expr = array(
			$search->compare( '==', 'catalog.list.refid', $prodid ),
			$search->getConditions()
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 1 );

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

		if( reset( $result ) === false )
		{
			$msg = sprintf( 'Adding product with ID "%1$s" is not allowed', $prodid );
			throw new Controller_Frontend_Basket_Exception( $msg );
		}
	}
protected function _checkCategory ( $ prodid ) { $ catalogListManager = MShop_Factory :: createManager ( $ this -> _getContext ( ) , 'catalog/list' ) ; $ search = $ catalogListManager -> createSearch ( true ) ; $ expr = array ( $ search -> compare ( '==' , 'catalog.list.refid' , $ prodid ) , $ search -> getConditions ( ) ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; $ search -> setSlice ( 0 , 1 ) ; $ result = $ catalogListManager -> searchItems ( $ search ) ; if ( reset ( $ result ) === false ) { $ msg = sprintf ( 'Adding product with ID "%1$s" is not allowed' , $ prodid ) ; throw new Controller_Frontend_Basket_Exception ( $ msg ) ; } }
Checks if the product is part of at least one category in the product catalog.

@param string $prodid Unique ID of the product
@throws Controller_Frontend_Basket_Exception If product is not associated to at least one category
Checks if the product is part of at least one category in the product catalog .