Sticky Buy Now Button in Dawn Theme

Topic summary

A user seeks to implement a sticky “Buy Now” button on product pages for their Shopify store using the Dawn theme. The site uses a direct checkout button instead of a standard “Add to Cart” option.

Initial Solution:

  • Custom CSS code added to theme.liquid file to make the payment button fixed at the bottom of the screen
  • Alternative version provided that activates the sticky button only after scrolling 500px down the page using jQuery

Implementation Issues & Fixes:

  • Initial code didn’t work due to missing jQuery library; resolved by adding jQuery CDN link
  • Button appeared site-wide instead of only on product pages; fixed by wrapping code in Shopify’s {% if template.name == 'product' %} conditional tag

Alternative Recommendations:

  • Third-party app suggested (Pasilobus Sticky Cart) as a code-free solution that maintains theme upgrade compatibility
  • Note that jQuery may negatively impact site speed scores

Current Status:

  • Original poster successfully implemented the custom code solution
  • One user reported the code didn’t work for their Dawn store
  • Another user has a related question about redirecting to cart after adding items
Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi,

My website is mgrow.club.

Here is the link to my product page. I dont have Add to Cart option but direct Buy Now button. I want to add Sticky Buy Now button on the product page: https://mgrow.club/products/design-strategy-for-next-billion-users

How can it be done

HI @MreenalChauhan

I hope this solution will works. feel free to text me back if you have any question.
Please follow below steps

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above tag
.shopify-payment-button__button{ position: fixed; bottom: 0px; left: 0; right: 0; z-index: 999; margin: auto; max-width: 480px; }

One More Alternate Option (button will sticky after scrolling down)

I hope this solution will works. feel free to text me back if you have any question.
Please follow below steps

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above tag
.shopify-payment-button__button.activebtn{ position: fixed; bottom: 0px; left: 0; right: 0; z-index: 999; margin: auto; max-width: 480px; }

Thanks Alok_Kasgar1. But none of the codes worked somehow. Am I missing something?

Hi @MreenalChauhan

May be jQuery library file missing. you c an add below code above the code that shared by me.

1 Like

It worked perfectly. Thanks a ton..

1 Like

Hey Alok,

Just one problem with this code. “Buy Now” sticky button is on the entire website including homepage, blog pages and not just on product page. Is there any way it can only be present on product page only.

Update this code, It will work only on product page now

{% if template.name == ‘product’ %}

.shopify-payment-button__button.activebtn{ position: fixed; bottom: 0px; left: 0; right: 0; z-index: 999; margin: auto; max-width: 480px; }

{% endif %}

1 Like

It worked. Thanks a lot

1 Like

Hi @MreenalChauhan ;

If you are considering adding a Sticky button. We have a free Sticky Cart app that works on any theme. You can easily add it with the app and keep your code clean so you can upgrade to Dawn’s newer versions easily later on.

Here is the app store link: https://apps.shopify.com/pasilobus-sticky-cart

We especially recommend not using Jquery or similar libraries which will drop your speed score.

Thanks for the instructions, but nothing here seemed to work for my Dawn store, based on checking using the Preview option.

@MreenalChauhan We recently released a sticky add-to-cart button app with a free plan. It works with all themes including Dawn, check it out:https://apps.shopify.com/pasilobus-sticky-cart

Sticky add to cart buttons feature you can add with this tutorial:

Hi

I have a scrolling Add to Cart Button, can anyone advise what and where I can change in code to get the add to cart to take the items added straight over to the basket?

https://meandmrsjones.uk/products/erotica-nightgown-robe