How to get BUY NOW button to redirect from my website to the cart (full screen)?

Hi there. I’ve searched the forum and can’t find anyone experiencing this issue.

  1. I’ve embedded a BUY NOW button on my website: https://simplegreensmoothies.com/21-day-cleanse-autumn-sas

  2. When you click on desktop, it opens a teeny tiny pop up window on top of the sales page (which looks lame).

How do I make it so when you click on the BUY NOW button, it redirects the page to the cart in the same window (not a new window) like this:

The code I have embedded for the buy now button is this:

Appreciate any help you can share on this!

I have not tested, but this reply to a similar post from 2017 offers an answer:

https://community.shopify.com/c/Shopify-APIs-SDKs/Using-buy-button-checkout-to-redirect-not-pop-up/m-p/352937/highlight/true#M18441

Hope that helps

To get the Shopify checkout page to open in the same tab / window when you click the Buy Now or Checkout button, you need to add the following code to your website in the header (or footer) scripts section.