public function addCartProduct($cartProduct) {
    if ($this->orderCartContent == null || !is_array($this->orderCartContent)) {
      $this->orderCartContent = array();
    }

    if ($cartProduct instanceof CartProduct) {
      $this->orderCartContent[] = $cartProduct;
    }

    return $this;
  }
public function addCartProduct($cartProduct) {
    if ($this->orderCartContent == null || !is_array($this->orderCartContent)) {
      $this->orderCartContent = array();
    }

    if ($cartProduct instanceof CartProduct) {
      $this->orderCartContent[] = $cartProduct;
    }

    return $this;
  }
public function addCartProduct ( $ cartProduct ) { if ( $ this -> orderCartContent == null || ! is_array ( $ this -> orderCartContent ) ) { $ this -> orderCartContent = array ( ) ; } if ( $ cartProduct instanceof CartProduct ) { $ this -> orderCartContent [ ] = $ cartProduct ; } return $ this ; }
Add a CartProduct in the orderCartContent.

@param CartProduct $cartProduct
The product to add to the cart
@return Connect2PayClient
Add a CartProduct in the orderCartContent .