Goal: Make the base Add to Cart button on a single-product page redirect directly to checkout (the sticky ATC already does this).
Scope: The store sells one product; applying the behavior site-wide or via the product template is acceptable.
Proposed approaches:
Use dynamic checkout buttons to let customers skip the cart and go straight to checkout (simpler if supported by theme).
Use the Liquid form return_to parameter to control post-submit redirect, though this may not work if JavaScript/AJAX handles cart updates.
If the theme uses AJAX to add to cart, add JavaScript to perform a redirect after the cart updates.
Edit main-cart-items.liquid to first redirect to the cart page, then auto-redirect to checkout; may require setting Cart type to “drawer” and adding JS. Screenshots and code references were provided and are central to the suggested fix.
User preference: A cleaner, direct redirect to checkout (not via cart).
Status: No final solution implemented; awaiting a code-based approach for a direct checkout redirect. Discussion remains open.
Summarized with AI on December 24.
AI used: gpt-5.
Trying to make our single product site redirect to checkout when clicking the Add To Cart button. You can see this behavior works fine in the sticky ATC bar, but I would like the same functionality for the base ATC button.
Can you please help?
Here is some code under snippets > buy-buttons.liquid, but not sure this it:
Thank you for reaching out and providing the necessary details. I’d be happy to help you achieve the desired functionality.
To clarify, you want the base ‘Add To Cart’ button to redirect to the checkout page, similar to the sticky ATC bar. Before we proceed, I just need to know: do you want this behavior to apply to all products, specific products, or specific product templates?
Please let me know, and I’ll do my best to assist you with the necessary code adjustments.
Hi @clearfur If using a free theme you can try contacting shopify support directly and seeing if this is something covered by the courtesy design time.
Meanwhile, If this is not a theme settting option the simplest route is to enable dynamic checkout buttons
..to be used in place of the default add-to-cart button which is either disabled or hidden with CSS.
For product forms, there is a return_to parameter that can be used on form tags but that may not be applicable if javascript is involved.
If the theme is using ajax to add items to the cart then that means either that javascript, or new javascript needs to be used to do the redirect after the cart updates.
If you need this customization then contact me by my email for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Add code below (refer screenshot below). This code apply when you click add to cart button after that it will redirect to cart page then will auto redirect to checkout page
Hi @Roy_12 ! Thank you so much for your generous offer! I very much appreciate your consideration. At this point, we are a one product shop, so whatever method is easiest would probably be best. All product, my one product or my template is all fine, whatever works easiest and is a clean/direct path to checkout.
@EBOOST was kind enough to offer a solution, however, it seems to be a less clean approach. I say this knowing I should not look a gift horse in the mouth…thank you EBOOST! I’m not complaining.
Thank you so mhch @EBOOST , much appreciated. I will keep this solution in mind, though I would prefer a direct redirect (PUN?) to the checkout page. You are clearly a problem solver and I very much appreciate your generous time and solution.