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

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)
Shopify Expert
129 0 30


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

Richard Nguyen | PageFly CEO
New Member
2 0 0

Hi Richard, the store URL is:

Thank you for checking :)


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=""> = function (open) {
return function (url, name, features) {
// Pass through non-shopify URLS
if (url.indexOf("myshopify") < 0) {
return, url, name, features);
// Use current window
console.log("Redirecting to:", url);
window.location.href = url;
return null;