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.
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.
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.
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?