Merge pull request #2524 from SteffenMahler/patch-2
Fire event if customer wants to "buy now"
This commit is contained in:
commit
e0b61c8a58
|
|
@ -98,6 +98,10 @@ class CartController extends Controller
|
||||||
*/
|
*/
|
||||||
public function store($id)
|
public function store($id)
|
||||||
{
|
{
|
||||||
|
if (request()->get('is_buy_now')) {
|
||||||
|
Event::dispatch('shop.item.buy-now', $id);
|
||||||
|
}
|
||||||
|
|
||||||
Event::dispatch('checkout.cart.item.add.before', $id);
|
Event::dispatch('checkout.cart.item.add.before', $id);
|
||||||
|
|
||||||
$result = Cart::addProduct($id, request()->except('_token'));
|
$result = Cart::addProduct($id, request()->except('_token'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue