This is an old revision of the document!
Table of Contents
Redirect the customer to a webpage instead of showing the Foxy receipt
If you'd like to redirect the customer to a webpage (perhaps a Thank You page on your site), you can use this snippet to do so.
Step 1: Apply the snippet to your configuration
- Copy the following code to your computer's clipboard:
<script>
window.location.href = "https://your-desired-url-here/";
</script>
- Go to your Receipt Template configuration in your Foxy admin.
- If it's not already selected, select Custom Template.
- Paste the code you copied into the
<head>section.
Step 2: Customise conditions
- If you would like the receipt to redirect to your page only the very first time (after the customer completes their order), you can change the first line of the snippet to
{% if first_receipt_display and context == “receipt” %}. This will show the Foxy receipt to the customer if they click the Receipt link from the email that they receive. - Update the link
the-desired-url-hereto your desired redirect URL. - Scroll down until you see the Update button and click to save.
- You can run a test by going into the Foxy transactions log and click (view) under the transaction id to view the current version of the web receipt.