This is an old revision of the document!


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

  • If you would like the receipt to redirect to your page only the very first time, copy the following code to your computer's clipboard:
{% if first_receipt_display %}
<script>
    window.location.href = "https://your-desired-url-here/"; 
</script>
{% endif %} 
  • If you want to redirect the customer every time the receipt is viewed (including when the View Web Receipt link is clicked from the email receipt), copy this version:
<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

  • Update the link the-desired-url-here to your desired redirect URL.
  • Scroll down until you see the Update Template 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.

Site Tools