Jump to content

RangeMachine

Clients
  • Posts

    9
  • Joined

  • Last visited

2 Followers

Recent Profile Visitors

1,024 profile views

RangeMachine's Achievements

  1. After upgrade to IPS 4.6 my customers are not able to purchase/renew/etc any item. OutOfRangeException: (0) #0 /var/www/censored/applications/nexus/modules/front/checkout/checkout.php(1176): IPS\Patterns\_ActiveRecord::load() #1 /var/www/censored/system/Helpers/Wizard/Wizard.php(181): IPS\nexus\modules\front\checkout\_checkout->_pay() #2 /var/www/censored/applications/nexus/modules/front/checkout/checkout.php(170): IPS\Helpers\_Wizard->__toString() #3 /var/www/censored/system/Dispatcher/Controller.php(101): IPS\nexus\modules\front\checkout\_checkout->manage() #4 /var/www/censored/applications/nexus/modules/front/checkout/checkout.php(57): IPS\Dispatcher\_Controller->execute() #5 /var/www/censored/system/Dispatcher/Dispatcher.php(153): IPS\nexus\modules\front\checkout\_checkout->execute() #6 /var/www/censored/index.php(13): IPS\_Dispatcher->run() #7 {main} Theres part of code from applications\nexus\modules\front\checkout\checkout.php (line 1171) file: /* Verify stock level one last time. It's possible someone added an item to their cart, then someone else did and checked out and the stock level is now 0. */ foreach ( $this->invoice->items as $item ) { if( $item->appKey == 'nexus' AND $item->typeKey == 'package' ) { $package = \IPS\nexus\Package::load( $item->id ); $data = $package->optionValuesStockAndPrice( $package->optionValues( $item->details ) ); if ( $data['stock'] != -1 and $data['stock'] < $item->quantity ) { \IPS\Output::i()->error( \IPS\Member::loggedIn()->language()->addToStack( 'not_enough_in_stock_checkout', FALSE, array( 'pluralize' => array( $data['stock'] ), 'sprintf' => array( $item->name ) ) ), '1X196/G', 403, '' ); } } } From what I can see $package = \IPS\nexus\Package::load( $item->id ); tries to load Package with purchase id, eg \IPS\nexus\Package::load( 672 ) in my case for my profile and of course it fails because theres no package with 672 id. Commenting this code fixes the problem. I guess it should use package id instead of purchase id, but I personally have no idea how to get package id from invoice. UPDATE: IPS support confirmed bug and it will be fixed in the next update.
  2. Running my plugin since I wrote it on my store without problems.
  3. No problem and thank you for answer 🙂
  4. Im randomly getting this exception time by time: Any hint?
×
×
  • Create New...