Makes it possible to share a link to redirect a user directly to the checkout page, with given items in the cart.

We allow two different variations of request. One is to pass a comma
separated list of SKUs in the products parameter. The other one is the
pass an array of products in the query parameters, in which case one
can specify the quantity as well.

An example on the first case:
mysite.com/direct-checkout-by-url?products=1234,5678

That would end up adding the products with sku 1234 and 5678 to the cart, both with a quantity of 1.

An example of the second case:
mysite.com/direct-checkout-by-url?products[0][quantity]=2&products[0][sku]=1234
That would end up adding the product with sku 1234 to the cart with a quantity of 2.

Redirecting to other places than the checkout page

Even though the name would indicate that it exclusively redirects users to the checkout page, you can also redirect to other places using Drupal's built in destination query parameter.

One such example could be to redirect to the cart instead of the checkout page. Given a product with a SKU 123 you would then use this link:

mysite.com/direct-checkout-by-url?products=123&destination=cart

Supporting organizations: 
Development and maintenance

Project information

Releases