Something went wrong.

Attempt to read property "code" on bool.
Attempt to read property "code" on bool on line 693 in /home/blestasite/public_html/plugins/order/order_form_controller.php
UnknownException::setErrorHandler
Line 232

/home/blestasite/public_html/vendors/monolog/monolog/src/Monolog/ErrorHandler.php

array(5) {
  [0]=>
  int(2)
  [1]=>
  string(39) "Attempt to read property "code" on bool"
  [2]=>
  string(68) "/home/blestasite/public_html/plugins/order/order_form_controller.php"
  [3]=>
  int(693)
  [4]=>
  array(0) {
  }
}
Monolog\ErrorHandler->handleError
Line 693

/home/blestasite/public_html/plugins/order/order_form_controller.php

array(4) {
  [0]=>
  int(2)
  [1]=>
  string(39) "Attempt to read property "code" on bool"
  [2]=>
  string(68) "/home/blestasite/public_html/plugins/order/order_form_controller.php"
  [3]=>
  int(693)
}
OrderFormController->getLineTotals
Line 445

/home/blestasite/public_html/plugins/order/order_form_controller.php

array(2) {
  [0]=>
  NULL
  [1]=>
  array(2) {
    ["items"]=>
    array(0) {
    }
    ["display_items"]=>
    array(0) {
    }
  }
}
OrderFormController->getSummary
Line 26

/home/blestasite/public_html/plugins/order/controllers/cart.php

Cart->index
Line 142

/home/blestasite/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php

Dispatcher::dispatch
Line 21

/home/blestasite/public_html/index.php

array(1) {
  [0]=>
  string(25) "/order/cart/index/domains"
}
645
                $display_item['index'] = $item['index'];
646
                $display_item['type'] = ($i++ == 0 ? $type : 'config_fee');
647
 
648
                if (isset($item['transfer'])) {
649
                    $display_item['transfer'] = $item['transfer'];
650
                }
651
 
652
                $cart['display_items'][] = $display_item;
653
            }
654
        };
655
 
656
        foreach ($cart['items'] as $item) {
657
            // Update the items in the cart
658
            $format_service_item($item, 'service', $options);
659
 
660
            if (isset($item['addons'])) {
661
                // Get the parent service's pricing info
662
                $pricing = $this->Services->getPackagePricing($item['pricing_id']);
663
 
664
                foreach ($item['addons'] as $addon_item) {
665
                    // Synchronize this addon with the parent service if set to do so and it is not
666
                    // already being prorated
667
                    $addon_pricing = $this->Services->getPackagePricing($addon_item['pricing_id']);
668
                    if ($pricing
669
                        && !$recurring
670
                        && $addon_pricing
671
                        && ($sync_date = $this->Services->getChildRenewDate(
672
                            $addon_pricing,
673
                            $pricing,
674
                            $this->order_form->client_group_id
675
                        ))
676
                    ) {
677
                        // Set the prorate date to the parent service's renew date
678
                        $options['prorateEndDate'] = $sync_date;
679
                    }
680
 
681
                    $format_service_item($addon_item, 'addon', $options);
682
                    unset($options['prorateEndDate']);
683
                }
684
            }
685
        }
686
 
687
        // Format totals and discount
688
        $total_keys = ['subtotal', 'total', 'total_without_exclusive_tax', 'discount'];
689
        foreach ($total_keys as $total_key) {
690
            if (isset($line_totals[$total_key])) {
691
                $line_totals[$total_key] = [
692
                    'amount' => round($line_totals[$total_key], $currency->precision ?? 4),
693
                    'amount_formatted' => $this->CurrencyFormat->format($line_totals[$total_key], $currency->code)
694
                ];
695
            }
696
        }
697
 
698
        foreach ($line_totals['tax'] as &$tax) {
699
            // Format each tax total
700
            $tax = [
701
                'amount' => round($tax, $currency->precision ?? 4),
702
                'amount_formatted' => $this->CurrencyFormat->format($tax, $currency->code)
703
            ];
704
        }
705
 
706
        return $line_totals;
707
    }
708
 
709
 
710
    /**
711
     * Checks if the domain being configured is eligible for bundling
712
     *
713
     * @param array $item A list of item details
714
     * @return boolean True if the domain is eligible for bundling, false otherwise
715
     */
716
    protected function isItemBundlableDomain($item) {
717
        $bundlable_domain = false;
718
        if (!empty($item['domain']) && !empty($this->order_form->meta['tlds'])) {
719
            $package = $this->Packages->getByPricingId($item['pricing_id'] ?? null);
720
            if ($package && !empty(array_intersect($package->meta->tlds ?? [], $this->order_form->meta['tlds']))) {
721
                $bundlable_domain = true;
722
            }
723
        }
724
        return $bundlable_domain;
725
    }
726
 
727
    /**
728
     * Checks if the item being configured is eligible for bundling
729
     *
730
     * @param array $item A list of item details
731
     * @return boolean True if the item is eligible for bundling, false otherwise
732
     */
733
    protected function isItemBundlablePackage($item) {
734
        return !empty($this->order_form->meta['package_groups'])
735
            && in_array($item['group_id'], $this->order_form->meta['package_groups']);
736
    }
737
 
738
    /**
739
     * Checks if there is a bundle eligible domain in the cart
740
     *
741
     * @return True if the cart contains a bundle eligible domain, false otherwise