Dominyka Posted February 9, 2023 Posted February 9, 2023 Hey everyone! I need to generate an invoice with a subscription product. This creates everything just fine for any product, but never adds the renewals part. I can see there is a separate $recurrings variable on the checkoutAndPay page. Should I populate that somehow? A bit lost how renewals work. $invoice_new = new \IPS\nexus\Invoice; $invoice_new->member = \IPS\nexus\Customer::loggedIn(); $invoice_new->currency = "USD"; $package = \IPS\nexus\Package::load( 1 ); $item = $package->createItemForCart( $package->price() ); $invoice_new->addItem( $item ); $invoice_new->save(); I'm using a regular product that renews, not the subscription module because I need to be able to use discount coupons for certain subscriptions, and those don't exist for the subscription module, only regular products.
Recommended Posts