How to add a script to the Thank You page?

I want to add a script to the thank you page which is getting displayed after the customer ordered something successfully.

I added my script into
/applications/views/screenportal/tpl/page/checkout_O/thankyou.tpl

because I assumed it would use this template because the page structure was the same in the frontend. I found that out because I made a test order.

However, it doesn’t shows my script. I’ve also added some testclasses to various containers to see if it works, but it just doesn’t work.

I deleted the tmp cache in the shop backend.

Is there another template which displays the thank you page?
Or why are my changes not working?

If you need further information, please let me know.

Thank you.

isn’t this folder name “checkout_O” kind of suspicious? especially because all other folders do no have this “_O” in their names.

The actual / real path is “page/checkout/thankyou.tpl”

Hmm, thanks for the info. I can’t find the “normal path” you gave me. There is no checkout folder, I only have application/views/screenportal/tpl/page/checkout_O

Is there any way how I can find out which template is used?
And by the way, is there a way I can test the thank you page without doing a test order? If I try to enter the page with it’s parameters it just redirects me to the homepage, which is of course good and logical, but a way I could test around without doing thousand test orders would be great

you obviously have a child theme “screenportal”
( https://oxidforge.org/en/understanding-theme-management-in-oxid-eshop-from-4-5-0.html )
If there is no page/checkout/ folder, that means your theme is using original checkout tempaltes.
you can simply create checkout folder, then copy and adapt thankyou.tpl from parent theme.

For repeating last checkout step, you need to uncomment those two lines in thankyou.php:


Then you can simply reload thankyou page, but you will still generate new order.

Thanks a lot, you were right. My shop is using templates from screenportal normally, but it uses the thankyoupage from the default template for some reason.