增加 checkoutService 属性 totalService
This commit is contained in:
parent
a6322880d0
commit
9413de29c7
|
|
@ -30,6 +30,7 @@ class CheckoutService
|
||||||
public $customer;
|
public $customer;
|
||||||
public $cart;
|
public $cart;
|
||||||
public $selectedProducts;
|
public $selectedProducts;
|
||||||
|
public $totalService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -169,13 +170,13 @@ class CheckoutService
|
||||||
|
|
||||||
$cartList = CartService::list($customer, true);
|
$cartList = CartService::list($customer, true);
|
||||||
$carts = CartService::reloadData($cartList);
|
$carts = CartService::reloadData($cartList);
|
||||||
|
$totalService = (new TotalService($currentCart, $cartList));
|
||||||
|
$this->totalService = $totalService;
|
||||||
|
|
||||||
$addresses = AddressRepo::listByCustomer($customer);
|
$addresses = AddressRepo::listByCustomer($customer);
|
||||||
$shipments = ShippingMethodService::getShippingMethods($this);
|
$shipments = ShippingMethodService::getShippingMethods($this);
|
||||||
$payments = PaymentMethodItem::collection(PluginRepo::getPaymentMethods())->jsonSerialize();
|
$payments = PaymentMethodItem::collection(PluginRepo::getPaymentMethods())->jsonSerialize();
|
||||||
|
|
||||||
$totalService = (new TotalService($currentCart, $cartList));
|
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'current' => [
|
'current' => [
|
||||||
'shipping_address_id' => $currentCart->shipping_address_id,
|
'shipping_address_id' => $currentCart->shipping_address_id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue