order kupon filtre
This commit is contained in:
parent
fc5d11f9a5
commit
903c0b0590
|
|
@ -200,7 +200,7 @@ class Carts extends CartController
|
|||
if (Cart::getCart()->coupon_code == $couponCode) {
|
||||
return response()->json([
|
||||
'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([
|
||||
'success' => true,
|
||||
'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([
|
||||
'success' => false,
|
||||
'message' => trans('rest-api::app.checkout.invalid-coupon'),
|
||||
'message' => trans('sarga-api::app.checkout.invalid-coupon'),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
report($e);
|
||||
|
||||
return response()->json([
|
||||
'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();
|
||||
|
||||
return response([
|
||||
'message' => __('rest-api::app.checkout.cart.coupon.remove'),
|
||||
'message' => __('sarga-api::app.checkout.cart.coupon.remove'),
|
||||
'success' => true,
|
||||
'cart' => new CartResource(Cart::getCart())
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue