public function addItem( MShop_Price_Item_Interface $item, $quantity = 1 )
	{
		if( $item->getCurrencyId() != $this->getCurrencyId() )
		{
			throw new MShop_Price_Exception( sprintf( 'Price can not be added. Currency ID "%1$s" of price item and currently used currency ID "%2$s" does not match.', $item->getCurrencyId(), $this->getCurrencyId() ) );
		}

		$this->_values['value'] = $this->_formatNumber( $this->getValue() + $item->getValue() * $quantity );
		$this->_values['costs'] = $this->_formatNumber( $this->getCosts() + $item->getCosts() * $quantity );
		$this->_values['rebate'] = $this->_formatNumber( $this->getRebate() + $item->getRebate() * $quantity );
	}
public function addItem( MShop_Price_Item_Interface $item, $quantity = 1 )
	{
		if( $item->getCurrencyId() != $this->getCurrencyId() )
		{
			throw new MShop_Price_Exception( sprintf( 'Price can not be added. Currency ID "%1$s" of price item and currently used currency ID "%2$s" does not match.', $item->getCurrencyId(), $this->getCurrencyId() ) );
		}

		$this->_values['value'] = $this->_formatNumber( $this->getValue() + $item->getValue() * $quantity );
		$this->_values['costs'] = $this->_formatNumber( $this->getCosts() + $item->getCosts() * $quantity );
		$this->_values['rebate'] = $this->_formatNumber( $this->getRebate() + $item->getRebate() * $quantity );
	}
public function addItem ( MShop_Price_Item_Interface $ item , $ quantity = 1 ) { if ( $ item -> getCurrencyId ( ) != $ this -> getCurrencyId ( ) ) { throw new MShop_Price_Exception ( sprintf ( 'Price can not be added. Currency ID "%1$s" of price item and currently used currency ID "%2$s" does not match.' , $ item -> getCurrencyId ( ) , $ this -> getCurrencyId ( ) ) ) ; } $ this -> _values [ 'value' ] = $ this -> _formatNumber ( $ this -> getValue ( ) + $ item -> getValue ( ) * $ quantity ) ; $ this -> _values [ 'costs' ] = $ this -> _formatNumber ( $ this -> getCosts ( ) + $ item -> getCosts ( ) * $ quantity ) ; $ this -> _values [ 'rebate' ] = $ this -> _formatNumber ( $ this -> getRebate ( ) + $ item -> getRebate ( ) * $ quantity ) ; }
Add the given price to the current one.

@param MShop_Price_Item_Interface $item Price item which should be added
@param integer $quantity Number of times the Price should be added
Add the given price to the current one .