Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Thankyou Page - Print Invoice feature

Thankyou Page - Print Invoice feature

kevingeorgex
Shopify Partner
6 0 1

Hi,

I would like to add a Checkout UI Extension with target on a thankyou page. I wanted a button, upon clicking opens up the print dialogue box. This functionality is for the customers to print the invoice. I tried window.print() which threw some console errors like 'window isn't defined'. Is it possible to implement this ?

Replies 2 (2)

Liam
Community Manager
3108 344 904

Hi Kevingeorgex,

 

Checkout extensions do not have access to window & document objects since they are loaded in a restricted environment, so you'll need to explore alternative options for achieving the functionality you're looking for. 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

kevingeorgex
Shopify Partner
6 0 1

Hi Liam,

 

Thanks for the response. Is there any alternative options possible other than using a UI extension while using checkout extensibility for thankyou page ? Third party apps aren't supported. I can revert to using apps and additional scripts until 2025 august.