Launch checkout on the same page as the buy button or product page?

Florian_Simonis
New Member
2 0 0

Is it possible to launch/load the checkout process on the same page/window as the product detail page is placed when using the buy button sales channel? Right now the checkout process opens in a new window and i think that is not so comfortable for users/customers.

Replies 3 (3)
Richard_
Shopify Expert
129 0 30

Hi,

Could I know your store URL to take a closer look on this issue?

Richard Nguyen | PageFly CEO
Florian_Simonis
New Member
2 0 0

Hi Richard, the store URL is: https://www.animalracing.de/shop

Thank you for checking :)

Florian

iBeFound
New Member
9 0 0

To launch the Shopify checkout page on the same window as the buy button or product page, you need to add the following code to the header/footer scripts section of your website.

 

<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);
</script>