How to create a BUY NOW button with direct checkout on shopify

We will see in this tutorial how to replace your add to cart button with a direct checkout Buy Now button on shopify.

We will remove the shopping cart step to optimize the sales funnel . Your clients will go directly to the checkout page by clicking on the Buy Now button.

You should rename the “Add to cart” button title by “Buy now” in the language editor of your theme.

How to install the code

1. Go to your Shopify admin and click on “online store”.

2. Click on the Action button and then “Edit code”.

3. Find the Sections folder and click on it, it will expand to show the files it contains.

4. Find the product-template.liquid file (or product.liquid depending on the theme) and open it.

5. Find the part of code ending in </form> or {% endform %} and copy/paste the code below right before it (ideally before a button tag).

<input type="hidden" name="return_to" value="/checkout" />

If you have Dropicheckout or Checkout X you can try this second code but it may still not work 😉

<input type="hidden" name="return_to" value="/a/checkout" />

6. All that’s left is to click on the “Save” button in the top right corner to save your changes!

That’s it, you have now shortened your sales funnel to the max 😉

Hope you found this tutorial helpful !

You have any ideas for new tutorials ? Any questions about this one ? Leave me a comment 😉

Share this article

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on telegram
Share on whatsapp
Share on email

Leave a Reply

Your email address will not be published. Required fields are marked *