Preorder bug fixes

This commit is contained in:
Prashant Singh 2019-06-25 17:08:52 +05:30
parent 85ed096185
commit 00bb4b0367
1 changed files with 9 additions and 1 deletions

View File

@ -114,7 +114,15 @@ class PreOrderController extends Controller
$eventResult = Event::fire('checkout.cart.add.before', $data['product']);
if ($eventResult[0] == null) {
$flag = true;
foreach ($eventResult as $res) {
if ($res == null) {
$flag = false;
}
}
if ($flag) {
$result = Cart::add($data['product'], $data);
Event::fire('checkout.cart.add.after', $result);