order kupon filtre

This commit is contained in:
merdan 2023-02-17 11:04:16 +05:00
parent fc5d11f9a5
commit 903c0b0590
1 changed files with 5 additions and 5 deletions

View File

@ -200,7 +200,7 @@ class Carts extends CartController
if (Cart::getCart()->coupon_code == $couponCode) { if (Cart::getCart()->coupon_code == $couponCode) {
return response()->json([ return response()->json([
'success' => false, 'success' => false,
'message' => trans('rest-api::app.checkout.coupon-already-applied'), 'message' => trans('sarga-api::app.checkout.coupon-already-applied'),
]); ]);
} }
@ -212,7 +212,7 @@ class Carts extends CartController
return response()->json([ return response()->json([
'success' => true, 'success' => true,
'data' => new CartResource($cart), 'data' => new CartResource($cart),
'message' => trans('rest-api::app.checkout.success-coupon'), 'message' => trans('sarga-api::app.checkout.success-coupon'),
]); ]);
} }
} }
@ -220,14 +220,14 @@ class Carts extends CartController
return response()->json([ return response()->json([
'success' => false, 'success' => false,
'message' => trans('rest-api::app.checkout.invalid-coupon'), 'message' => trans('sarga-api::app.checkout.invalid-coupon'),
]); ]);
} catch (\Exception $e) { } catch (\Exception $e) {
report($e); report($e);
return response()->json([ return response()->json([
'success' => false, 'success' => false,
'message' => trans('rest-api::app.checkout.coupon-apply-issue'), 'message' => trans('sarga-api::app.checkout.coupon-apply-issue'),
]); ]);
} }
} }
@ -242,7 +242,7 @@ class Carts extends CartController
Cart::removeCouponCode()->collectTotals(); Cart::removeCouponCode()->collectTotals();
return response([ return response([
'message' => __('rest-api::app.checkout.cart.coupon.remove'), 'message' => __('sarga-api::app.checkout.cart.coupon.remove'),
'success' => true, 'success' => true,
'cart' => new CartResource(Cart::getCart()) 'cart' => new CartResource(Cart::getCart())
]); ]);