diff --git a/beike/Shop/Services/CheckoutService.php b/beike/Shop/Services/CheckoutService.php index 9434a5dd..22e435c7 100644 --- a/beike/Shop/Services/CheckoutService.php +++ b/beike/Shop/Services/CheckoutService.php @@ -30,6 +30,7 @@ class CheckoutService public $customer; public $cart; public $selectedProducts; + public $totalService; /** @@ -169,13 +170,13 @@ class CheckoutService $cartList = CartService::list($customer, true); $carts = CartService::reloadData($cartList); + $totalService = (new TotalService($currentCart, $cartList)); + $this->totalService = $totalService; $addresses = AddressRepo::listByCustomer($customer); $shipments = ShippingMethodService::getShippingMethods($this); $payments = PaymentMethodItem::collection(PluginRepo::getPaymentMethods())->jsonSerialize(); - $totalService = (new TotalService($currentCart, $cartList)); - $data = [ 'current' => [ 'shipping_address_id' => $currentCart->shipping_address_id,