public function setQuantity( $quantity )
	{
		if( !is_numeric( $quantity ) ) {
			throw new MShop_Order_Exception( 'Quantity is invalid. Please enter a positive integer' );
		}

		$quantity = (int) $quantity;

		if( $quantity == $this->getQuantity() ) { return; }

		if( $quantity < 1 || $quantity > 2147483647 ) {
			throw new MShop_Order_Exception( sprintf( 'Quantity must be a positive integer and must not exceed %1$d', 2147483647 ) );
		}

		$this->_values['quantity'] = $quantity;
		$this->setModified();
	}
public function setQuantity( $quantity )
	{
		if( !is_numeric( $quantity ) ) {
			throw new MShop_Order_Exception( 'Quantity is invalid. Please enter a positive integer' );
		}

		$quantity = (int) $quantity;

		if( $quantity == $this->getQuantity() ) { return; }

		if( $quantity < 1 || $quantity > 2147483647 ) {
			throw new MShop_Order_Exception( sprintf( 'Quantity must be a positive integer and must not exceed %1$d', 2147483647 ) );
		}

		$this->_values['quantity'] = $quantity;
		$this->setModified();
	}
public function setQuantity ( $ quantity ) { if ( ! is_numeric ( $ quantity ) ) { throw new MShop_Order_Exception ( 'Quantity is invalid. Please enter a positive integer' ) ; } $ quantity = ( int ) $ quantity ; if ( $ quantity == $ this -> getQuantity ( ) ) { return ; } if ( $ quantity < 1 || $ quantity > 2147483647 ) { throw new MShop_Order_Exception ( sprintf ( 'Quantity must be a positive integer and must not exceed %1$d' , 2147483647 ) ) ; } $ this -> _values [ 'quantity' ] = $ quantity ; $ this -> setModified ( ) ; }
Sets the amount of products the customer has added.

@param integer $quantity Amount of products
Sets the amount of products the customer has added .