Merge pull request #2125 from rahulshukla-webkul/development
try and catch in password section and wishlist add remove
This commit is contained in:
commit
5a63b48332
|
|
@ -80,7 +80,7 @@ class ResetPasswordController extends Controller
|
|||
'email' => trans($response)
|
||||
]);
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('success', trans($e->getMessage()));
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,11 @@ class WishlistController extends Controller
|
|||
return redirect()->back();
|
||||
}
|
||||
} else {
|
||||
session()->flash('warning', trans('customer::app.wishlist.already'));
|
||||
$this->wishlistRepository->findOneWhere([
|
||||
'product_id' => $data['product_id']
|
||||
])->delete();
|
||||
|
||||
session()->flash('success', trans('customer::app.wishlist.removed'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=8fc3af6f1d9024329021",
|
||||
"/css/shop.css": "/css/shop.css?id=6ded8c6338e6cf59a094"
|
||||
"/css/shop.css": "/css/shop.css?id=617c680f279cb4a73734"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,8 +202,6 @@ input {
|
|||
}
|
||||
|
||||
.add-to-wishlist.already {
|
||||
pointer-events: none;
|
||||
|
||||
.wishlist-icon {
|
||||
background-image: url('../images/wishlist-added.svg') !important;
|
||||
}
|
||||
|
|
@ -1843,7 +1841,7 @@ section.product-detail {
|
|||
.sample-list {
|
||||
padding: 15px 0;
|
||||
border-top: solid 1px rgba(162, 162, 162, 0.2);
|
||||
|
||||
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
margin-top: 0;
|
||||
|
|
@ -1937,7 +1935,7 @@ section.product-detail {
|
|||
.qty {
|
||||
float: right;
|
||||
|
||||
.control-group {
|
||||
.control-group {
|
||||
max-width: initial;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
|
|
@ -1987,7 +1985,7 @@ section.product-detail {
|
|||
.control-group {
|
||||
margin-bottom: 0;
|
||||
color: #5E5E5E;
|
||||
|
||||
|
||||
label {
|
||||
color: #242424;
|
||||
}
|
||||
|
|
@ -2402,7 +2400,7 @@ section.cart {
|
|||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
margin-top: 10px;
|
||||
|
||||
|
||||
.control-group {
|
||||
font-size: 16px !important;
|
||||
margin: 0px;
|
||||
|
|
@ -2979,7 +2977,7 @@ section.review {
|
|||
.product-price {
|
||||
margin-top: 10px;
|
||||
word-break: break-all;
|
||||
|
||||
|
||||
.pro-price {
|
||||
color: $disc-price;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class ForgetPasswordController extends Controller
|
|||
['email' => trans($response)]
|
||||
);
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('success', trans($e->getMessage()));
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,27 +57,33 @@ class ResetPasswordController extends Controller
|
|||
*/
|
||||
public function store()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|confirmed|min:6',
|
||||
]);
|
||||
|
||||
$response = $this->broker()->reset(
|
||||
request(['email', 'password', 'password_confirmation', 'token']), function ($admin, $password) {
|
||||
$this->resetPassword($admin, $password);
|
||||
}
|
||||
);
|
||||
|
||||
if ($response == Password::PASSWORD_RESET) {
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
return back()
|
||||
->withInput(request(['email']))
|
||||
->withErrors([
|
||||
'email' => trans($response)
|
||||
try {
|
||||
$this->validate(request(), [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|confirmed|min:6',
|
||||
]);
|
||||
|
||||
$response = $this->broker()->reset(
|
||||
request(['email', 'password', 'password_confirmation', 'token']), function ($admin, $password) {
|
||||
$this->resetPassword($admin, $password);
|
||||
}
|
||||
);
|
||||
|
||||
if ($response == Password::PASSWORD_RESET) {
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
return back()
|
||||
->withInput(request(['email']))
|
||||
->withErrors([
|
||||
'email' => trans($response)
|
||||
]);
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue