public function addProduct(
        $id,
        $description,
        $productType,
        $price,
        $quantity,
        $vatCode,
        $vatPercentage
    ) {
        if (! is_numeric($price)) {
            throw new Error('Price must be numeric', 1);
        }
        if (! is_numeric($quantity)) {
            throw new Error('Quantity must be numeric', 1);
        }

        $this->_products[] = array(
            'productId'     => $id,
            'productType'   => $productType,
            //description mag maar 45 chars lang zijn
            'description'   => substr($description, 0, 45),
            'price'         => $price,
            'quantity'      => $quantity * 1,
            'vatCode'       => $vatCode,
            'vatPercentage' => $vatPercentage
        );
    }
public function addProduct(
        $id,
        $description,
        $productType,
        $price,
        $quantity,
        $vatCode,
        $vatPercentage
    ) {
        if (! is_numeric($price)) {
            throw new Error('Price must be numeric', 1);
        }
        if (! is_numeric($quantity)) {
            throw new Error('Quantity must be numeric', 1);
        }

        $this->_products[] = array(
            'productId'     => $id,
            'productType'   => $productType,
            //description mag maar 45 chars lang zijn
            'description'   => substr($description, 0, 45),
            'price'         => $price,
            'quantity'      => $quantity * 1,
            'vatCode'       => $vatCode,
            'vatPercentage' => $vatPercentage
        );
    }
public function addProduct ( $ id , $ description , $ productType , $ price , $ quantity , $ vatCode , $ vatPercentage ) { if ( ! is_numeric ( $ price ) ) { throw new Error ( 'Price must be numeric' , 1 ) ; } if ( ! is_numeric ( $ quantity ) ) { throw new Error ( 'Quantity must be numeric' , 1 ) ; } $ this -> _products [ ] = array ( 'productId' => $ id , 'productType' => $ productType , //description mag maar 45 chars lang zijn 'description' => substr ( $ description , 0 , 45 ) , 'price' => $ price , 'quantity' => $ quantity * 1 , 'vatCode' => $ vatCode , 'vatPercentage' => $ vatPercentage ) ; }
Add a product to an order
Attention! This is purely an administrative option, the amount of the order is not modified.

@param string $id
@param string $description
@param string $productType
@param int $price
@param int $quantity
@param int $vatCode
@param string $vatPercentage

@throws Error
Add a product to an order Attention! This is purely an administrative option the amount of the order is not modified .