Merge pull request #2157 from jitendra-webkul/1.0

Removed commented code
This commit is contained in:
Jitendra Singh 2020-01-27 16:52:08 +05:30 committed by GitHub
commit 0b3a7a6c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -77,7 +77,7 @@ class CartController extends Controller
*/
public function add($id)
{
// try {
try {
$result = Cart::addProduct($id, request()->all());
if ($result) {
@ -91,13 +91,13 @@ class CartController extends Controller
} else {
session()->flash('warning', trans('shop::app.checkout.cart.item.error-add'));
}
// } catch(\Exception $e) {
// session()->flash('error', trans($e->getMessage()));
} catch(\Exception $e) {
session()->flash('error', trans($e->getMessage()));
// $product = $this->productRepository->find($id);
$product = $this->productRepository->find($id);
// return redirect()->route('shop.productOrCategory.index', $product->url_key);
// }
return redirect()->route('shop.productOrCategory.index', $product->url_key);
}
return redirect()->back();
}