protected function _checkLimits( MShop_Price_Item_Interface $sum, $count )
	{
		$currencyId = $sum->getCurrencyId();
		$config = $this->_getItem()->getConfig();

		if( ( isset( $config['min-value'][$currencyId] ) ) && ( $sum->getValue() + $sum->getRebate() < $config['min-value'][$currencyId] ) )
		{
			$msg = sprintf( 'The minimum basket value of %1$s isn\'t reached', $config['min-value'][$currencyId] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['max-value'][$currencyId] ) ) && ( $sum->getValue() + $sum->getRebate() > $config['max-value'][$currencyId] ) )
		{
			$msg = sprintf( 'The maximum basket value of %1$s is exceeded', $config['max-value'][$currencyId] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['min-products'] ) ) && ( $count < $config['min-products'] ) )
		{
			$msg = sprintf( 'The minimum product quantity of %1$d isn\'t reached', $config['min-products'] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['max-products'] ) ) && ( $count > $config['max-products'] ) )
		{
			$msg = sprintf( 'The maximum product quantity of %1$d is exceeded', $config['max-products'] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}
	}
protected function _checkLimits( MShop_Price_Item_Interface $sum, $count )
	{
		$currencyId = $sum->getCurrencyId();
		$config = $this->_getItem()->getConfig();

		if( ( isset( $config['min-value'][$currencyId] ) ) && ( $sum->getValue() + $sum->getRebate() < $config['min-value'][$currencyId] ) )
		{
			$msg = sprintf( 'The minimum basket value of %1$s isn\'t reached', $config['min-value'][$currencyId] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['max-value'][$currencyId] ) ) && ( $sum->getValue() + $sum->getRebate() > $config['max-value'][$currencyId] ) )
		{
			$msg = sprintf( 'The maximum basket value of %1$s is exceeded', $config['max-value'][$currencyId] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['min-products'] ) ) && ( $count < $config['min-products'] ) )
		{
			$msg = sprintf( 'The minimum product quantity of %1$d isn\'t reached', $config['min-products'] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}

		if( ( isset( $config['max-products'] ) ) && ( $count > $config['max-products'] ) )
		{
			$msg = sprintf( 'The maximum product quantity of %1$d is exceeded', $config['max-products'] );
			throw new MShop_Plugin_Provider_Exception( $msg );
		}
	}
protected function _checkLimits ( MShop_Price_Item_Interface $ sum , $ count ) { $ currencyId = $ sum -> getCurrencyId ( ) ; $ config = $ this -> _getItem ( ) -> getConfig ( ) ; if ( ( isset ( $ config [ 'min-value' ] [ $ currencyId ] ) ) && ( $ sum -> getValue ( ) + $ sum -> getRebate ( ) < $ config [ 'min-value' ] [ $ currencyId ] ) ) { $ msg = sprintf ( 'The minimum basket value of %1$s isn\'t reached' , $ config [ 'min-value' ] [ $ currencyId ] ) ; throw new MShop_Plugin_Provider_Exception ( $ msg ) ; } if ( ( isset ( $ config [ 'max-value' ] [ $ currencyId ] ) ) && ( $ sum -> getValue ( ) + $ sum -> getRebate ( ) > $ config [ 'max-value' ] [ $ currencyId ] ) ) { $ msg = sprintf ( 'The maximum basket value of %1$s is exceeded' , $ config [ 'max-value' ] [ $ currencyId ] ) ; throw new MShop_Plugin_Provider_Exception ( $ msg ) ; } if ( ( isset ( $ config [ 'min-products' ] ) ) && ( $ count < $ config [ 'min-products' ] ) ) { $ msg = sprintf ( 'The minimum product quantity of %1$d isn\'t reached' , $ config [ 'min-products' ] ) ; throw new MShop_Plugin_Provider_Exception ( $ msg ) ; } if ( ( isset ( $ config [ 'max-products' ] ) ) && ( $ count > $ config [ 'max-products' ] ) ) { $ msg = sprintf ( 'The maximum product quantity of %1$d is exceeded' , $ config [ 'max-products' ] ) ; throw new MShop_Plugin_Provider_Exception ( $ msg ) ; } }
Checks for the configured basket limits.

@param MShop_Price_Item_Interface $sum Total sum of all product price items
@param integer $count Total number of products in the basket
@throws MShop_Plugin_Provider_Exception If one of the minimum or maximum limits is exceeded
Checks for the configured basket limits .