add action hook
This commit is contained in:
parent
282987f1ff
commit
08d951fe90
|
|
@ -99,6 +99,7 @@ class CheckoutService
|
||||||
$order = OrderRepo::create($checkoutData);
|
$order = OrderRepo::create($checkoutData);
|
||||||
StateMachineService::getInstance($order)->changeStatus(StateMachineService::UNPAID, '', true);
|
StateMachineService::getInstance($order)->changeStatus(StateMachineService::UNPAID, '', true);
|
||||||
CartRepo::clearSelectedCartProducts($customer);
|
CartRepo::clearSelectedCartProducts($customer);
|
||||||
|
hook_action('checkout_confirm', $order);
|
||||||
DB::commit();
|
DB::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
|
|
@ -109,9 +110,9 @@ class CheckoutService
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算当前选中商品总重量
|
* 计算当前选中商品总重量, 当前产品无重量, 待处理
|
||||||
* @todo
|
|
||||||
* @return int
|
* @return int
|
||||||
|
* @todo
|
||||||
*/
|
*/
|
||||||
public function getCartWeight(): int
|
public function getCartWeight(): int
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue