Option mission message added for configurable, group and bundle products during add cart

This commit is contained in:
jitendra 2019-09-04 17:33:55 +05:30
parent 55f888c1df
commit 94290e6742
2 changed files with 5 additions and 5 deletions

View File

@ -319,7 +319,7 @@ class Bundle extends AbstractType
public function prepareForCart($data)
{
if (! isset($data['bundle_options']))
return trans('shop::app.checkout.cart.integrity.missing_fields');
return trans('shop::app.checkout.cart.integrity.missing_options');
$products = parent::prepareForCart($data);

View File

@ -61,7 +61,7 @@ class CartController extends Controller
*/
public function add($id)
{
// try {
try {
$result = Cart::addProduct($id, request()->all());
if ($result) {
@ -75,9 +75,9 @@ 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()));
}
return redirect()->back();
}