diff --git a/packages/Webkul/API/Http/Controllers/Shop/CartController.php b/packages/Webkul/API/Http/Controllers/Shop/CartController.php index 687df82ef..1d8ba4096 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CartController.php @@ -155,7 +155,7 @@ class CartController extends Controller return response($validator->errors(), Response::HTTP_BAD_REQUEST); } - foreach ($request->qty as $qty) { + foreach ($request->get('qty') as $qty) { if ($qty <= 0) { return response()->json([ 'message' => trans('shop::app.checkout.cart.quantity.illegal'), @@ -163,12 +163,12 @@ class CartController extends Controller } } - foreach ($request->qty as $itemId => $qty) { + foreach ($request->get('qty') as $itemId => $qty) { $item = $this->cartItemRepository->findOneByField('id', $itemId); Event::dispatch('checkout.cart.item.update.before', $itemId); - Cart::updateItems($request->all()); + Cart::updateItems(['qty' => $request->get('qty')]); Event::dispatch('checkout.cart.item.update.after', $item); } diff --git a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php index a0d94282d..bc8801b1f 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php @@ -86,11 +86,11 @@ class CustomerController extends Controller } $data = [ - 'first_name' => $request->first_name, - 'last_name' => $request->last_name, - 'email' => $request->email, - 'password' => $request->password, - 'password' => bcrypt($request->password), + 'first_name' => $request->get('first_name'), + 'last_name' => $request->get('last_name'), + 'email' => $request->get('email'), + 'password' => $request->get('password'), + 'password' => bcrypt($request->get('password')), 'channel_id' => core()->getCurrentChannel()->id, 'is_verified' => 1, 'customer_group_id' => $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id