How to add window.close() for continue shopping button in Thank You page ? need help
Hi @Jonkeithguo84 Im not sure why you want to do this. but you can add a script in settings/checkout → scroll to the bottom → Post-purchase page
Hi Leysam, to clarify, our custom app, open a new page when customer checks and once customer completed the checkout, and click on thank you, we will need window.close() to close the checkout page and bring the customer back to our portal.
And we cant edit the code at the Post-purchase page
thanks
You need to add the code to your custom app. Would you mind sharing your site URL via PM?
@Jonkeithguo84 Since you are using checkout extensibility → you will need to add pixel or any script in the customer event settings
analytics.subscribe('checkout_completed', (event) => {
// I havent tested but try using any of these code.
//window.close();
//event.context.window.close()
});
1 Like
I will try it , thank you for your help ![]()

