Jump to content

Add Item To Invoice - Programatically

Recommended Posts

I need to add an upsell button to an invoice.


When a person is in the invoice at https://tealswan.com/checkout/{invoiceID}/

i would like to add a button that adds an item to the invoice.


I found this function, but I don't know how to generate the  \Item.

IPS\nexus\Invoice::addItem(   \IPS\nexus\Invoice\Item     $item,     $cartKey = NULL )


To generate the Item I also need to generate a currency but if I do \IPS\nexus\Money::__construct (  $amount,  $currency )

as $money = IPS\nexus\Money::__construct( 199'USD' ) it just shows error.



Any place I can see some examples? Or someone can help?

Link to comment
Share on other sites

Or alternatively -

Create a new cart/invoice with TWO items on a click of a button. I know how to do that with one item, but any way to have a <form> that adds a second item too?

I've tried working with associated items, but it seems they only work of the associated purchase is in the cart. Once it turns into an invoice it's not working.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...