Skip to content

Instantly share code, notes, and snippets.

@joe-dempsey
Last active January 29, 2018 15:25
Show Gist options
  • Save joe-dempsey/414d5c3db9ad79ad1f561469ac1a535b to your computer and use it in GitHub Desktop.
Save joe-dempsey/414d5c3db9ad79ad1f561469ac1a535b to your computer and use it in GitHub Desktop.
{% comment %}Here we send a user straight to the checkout after adding a product to the cart - bypassing the cart - useful where we don't want to set up ajax or streamline the experience{% endcomment %}
<form action="/cart/add" method="post" enctype="multipart/form-data" id="add-to-cart-form">
{% comment %} nest this within the form{% endcomment %}
<input type="hidden" name="return_to" value="/checkout" />
// product form fields
// blah blah blah
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment