Buy now button

How can I create a “Buy now” button, to add a specific product in cart and go immediately to checkout ?

Commerce treats those things as 2 separate actions that need to be performed sequentially.

You could mimic it with AJAX: send the standard add to cart request, on complete send a request with data checkout=1 to prepare the order for checkout, and then redirect to the checkout.

OK, I was think about that :slight_smile: Thank you !

1 Like