Using buy button - checkout to redirect not pop up

Andrew_Rubio
New Member
1 0 1

Hi,

I'm currently using the "buy button" app as an embedded code on my website. It works well, however after clicking on "Checkout" on the cart slider that comes out of the right, the checkout is actually a pop up.

How can I do it so that the checkout actually redirects the current page instead of popping up. I think many of my users would prefer and trust it if it was on the same page.

Here is my website: www.andrewrubio.com

If you go to a product page and try a purchase you will see what I mean: http://www.andrewrubio.com/shop/gin-selection

Thanks so much,

Andrew

Replies 17 (17)
Busfox
Shopify Staff
619 49 101

Hi Andrew,

I did a bit of testing, and I believe that it's only ever going to be a modal, but our support team may know better. Can you reach out to them at support@shopify.com or 1-888-shopify?

Andrew | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Tofolux
Tourist
9 0 5

Did anyone ever figure this out? Its driving me nuts :(

Gary1ie
New Member
2 0 4

Hi,

Replace the following line of code;

<script type="text/javascript">

With the code below;

<script data-shopify-buy-ui="">
window.open = function (open) {
return function (url, name, features) {
// Pass through non-shopify URLS
if (url.indexOf("myshopify") < 0) {
return open.call(window, url, name, features);
}
// Use current window
console.log("Redirecting to:", url);
window.location.href = url;
return null;
};
}(window.open);

The checkout page should now open in the same window.

Cheers

Gary

ScottyMojo
New Member
1 0 2

This works brilliantly! Is there a way to parse the cart data through a custom domain that is configured for a Shopify store instead of the checkout going through the https://checkout.shopify.com domain?

Dear_Giana
New Member
2 0 0

Does this code have to replace every element for every single instance where I am using the buy button?

Nemo_de_Sol
New Member
1 0 5

Hey guys/gals.

Actually, the solution is *very* simple. 

All you need to do is add:

"popup":false,

Like this:

},
  "cart": {
    "contents": {
      "button": true
    },
    "popup":false,
    "styles": {
      "button": {
        "background-color": "#d63c0b",
        "font-family": "Open Sans, sans-serif",
        "font-size": "13px",
        "padding-top": "14.5px",
        "padding-bottom": "14.5px",
        ":hover": {
          "background-color": "#c1360a"

Took me 2 hours to figure this out! :)

 

Keenan_Flogerzi
Shopify Partner
1 0 0

Stellar! Thank you!

Fiadh_Woven_Des
Shopify Partner
1 0 0

*So* simply. Thank you!

MAGNEZOL
Shopify Partner
1 0 0

Why does this not work for me?

Using Debut theme

 

Copy Paste exact same place..

 


@Nemo_de_Sol wrote:

Hey guys/gals.

Actually, the solution is *very* simple. 

All you need to do is add:

"popup":false,

Like this:

},
  "cart": {
    "contents": {
      "button": true
    },
    "popup":false,
    "styles": {
      "button": {
        "background-color": "#d63c0b",
        "font-family": "Open Sans, sans-serif",
        "font-size": "13px",
        "padding-top": "14.5px",
        "padding-bottom": "14.5px",
        ":hover": {
          "background-color": "#c1360a"

Took me 2 hours to figure this out! :)