Shirayukiie 0 Posted July 5, 2019 Share Posted July 5, 2019 Hi, Im using Commerce only for virtual items so billing adressses are not necessary. Since IPB 4.4.X getting this error: TypeError: Argument 1 passed to IPS\nexus\_Invoice::set_billaddress() must be an instance of IPS\GeoLocation, null given, called in /home/user/public_html/system/Patterns/ActiveRecord.php on line 372 (0) #0 /home/user/public_html/system/Patterns/ActiveRecord.php(372): IPS\nexus\_Invoice->set_billaddress(NULL) #1 /home/user/public_html/init.php(867) : eval()'d code(686): IPS\Patterns\_ActiveRecord->__set('billaddress', NULL) #2 /home/user/public_html/applications/nexus/tasks/generateRenewalInvoices.php(106): IPS\Patterns\rules_hook_ipsPatternsActiveRecord->__set('billaddress', NULL) #3 /home/user/public_html/system/Task/Task.php(255): IPS\nexus\tasks\_generateRenewalInvoices->execute() #4 /home/user/public_html/applications/core/modules/admin/settings/advanced.php(709): IPS\_Task->run() #5 /home/user/public_html/system/Dispatcher/Controller.php(85): IPS\core\modules\admin\settings\_advanced->runTask() #6 /home/user/public_html/applications/core/modules/admin/settings/advanced.php(34): IPS\Dispatcher\_Controller->execute() #7 /home/user/public_html/system/Dispatcher/Dispatcher.php(152): IPS\core\modules\admin\settings\_advanced->execute() #8 /home/user/public_html/admin/index.php(14): IPS\_Dispatcher->run() #9 {main} Since most of my customers dont enter any adress and its returning a null value cause of that is there any way to bypass this easily? Thanks a lot in advance Link to comment Share on other sites More sharing options...
Shirayukiie 0 Posted July 8, 2019 Author Share Posted July 8, 2019 Tiny bump Link to comment Share on other sites More sharing options...
TrynCatchMe 0 Posted July 13, 2019 Share Posted July 13, 2019 Same error Link to comment Share on other sites More sharing options...
S!r.ReaDy 120 Posted July 13, 2019 Share Posted July 13, 2019 Try to set a default value for the option for everyone. Link to comment Share on other sites More sharing options...
mr-pimpen 387 Posted July 14, 2019 Share Posted July 14, 2019 there is an update for that if you check your updates in the acp maybe this would fix it when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
Shirayukiie 0 Posted July 20, 2019 Author Share Posted July 20, 2019 On 7/14/2019 at 6:00 AM, mr-pimpen said: there is an update for that if you check your updates in the acp maybe this would fix it When i clicked Apply Patch i was redirected back to WebFlake 4.4.4 release and it does not contain the patch. Anyway, resolved this myself by editing .../applications/nexus/modules/admin/customers/purchases.php Go to line 294 and comment out the entire try block until line 306. /* Handle submissions */ if ( $values = $form->values() ) { /* Generate Invoice */ $invoice = new \IPS\nexus\Invoice; $invoice->currency = $this->purchase->renewal_currency; $invoice->member = $this->purchase->member; /*try { $invoice->billaddress = $this->purchase->original_invoice->billaddress; } catch( \OutOfRangeException $e ) # original invoice doesn't exist { try { $invoice->billaddress = \IPS\GeoLocation::buildFromJson( \IPS\Db::i()->select( 'address', 'nexus_customer_addresses', array( "member=? AND primary_billing=?", $this->purchase->member->member_id, 1 ) )->first() ); } catch( \UnderflowException $e ) { } # no billing primary address set }*/ $invoice->addItem( \IPS\nexus\Invoice\Item\Renewal::create( $this->purchase, $values['renew_cycles'] ) ); $invoice->save(); $invoice->sendNotification(); Boom it works like a charm again! (Obviously does not work for you who still needs to use billing adress tho) Link to comment Share on other sites More sharing options...
mr-pimpen 387 Posted July 21, 2019 Share Posted July 21, 2019 good to see that when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
New_Vicious 0 Posted August 18, 2019 Share Posted August 18, 2019 No working in 4.4.5 I was thinking of buying this plugin https://invisioncommunity.com/files/file/9148-opt-in-billing-disable-billing-address-for-subscriptions/ Link to comment Share on other sites More sharing options...
Alias_59 0 Posted September 25, 2019 Share Posted September 25, 2019 Hi, I'sorry but I not working for me Link to comment Share on other sites More sharing options...
Recommended Posts