Changing the "After Checkout" page

DaveHDaveH Member
Hi,

Is there a way to have a custom page displayed after a successful order (instead of the receipt page)?

Thanks!
Comments
  • fc_adamfc_adam FoxyCart Team
    @DaveH,

    Good question - it is indeed possible. The best way to achieve it at the moment would be to customise your store's receipt template to redirect the customer from there using javascript, for example:
    <script>
    window.location.replace("http://yoursite.com/custom-receipt");
    </script>
  • DaveHDaveH Member
    If I altered this, would I still be able to link to the receipt page later?

    I'd love a custom page, explaining what the customer can expect (regarding fulfilment), but still have a link to view the receipt.

    Also- in the receipt email the first link is "View in a browser".... would this link be redirected as well?

    Thanks.
  • fc_adamfc_adam FoxyCart Team
    @DaveH,

    Great question - taking that approach would redirect anytime the customer tried to access the receipt. There are two things you could do here:

    First would be to actually include the custom information you need within the actual receipt. You can certainly customise the receipt template as much as you need - keeping everything in one place.

    If you would prefer to redirect though, you can set it to only redirect on the first time the receipt loaded (ie. only after they had just completed the purchase). To do that, you'd wrap the code I provided previously in an first_receipt_display conditional, like this:
    {% if first_receipt_display %}
    <script>
    window.location.replace("http://yoursite.com/custom-receipt");
    </script>
    {% endif %}
  • DaveHDaveH Member
    Thanks so much for this- exactly what I needed!

    Sorry for a noob question- can you point me to WHERE I would add this to my receipt template?

    I can't seem to find this. Thanks!
  • fc_marijafc_marija FoxyCart Team
    Hi @DaveH -

    I believe i answered this in the support email to you, but I'll put it here as well in case someone else needs the info. Excerpt from the email:
    Thanks for reaching out. In order to modify the web receipt template, you'll go to TEMPLATES receipt in your admin. You'll need to activate the "Custom Template" option to see your code to edit. A link to that section of your FoxyCart admin is here: https://admin.foxycart.com/admin.php?ThisAction=EditTemplate&template=receipt

    If you're looking to edit the email receipt, that'll be under TEMPLATES as well, you'll click "email". Note that there's a plain text email and an html email that you have the option to send (text email is chosen by email clients unable to display html), so you'll probably want to make changes to both of those if you're editing the email.

    In the interest of giving you as much information as possible, there is a wealth of information on editing your templates here: https://wiki.foxycart.com/v/2.0/templates, if you haven't seen it.
    Best!
    Marija
  • DaveHDaveH Member
    You did answer perfectly, Marija! I just put this post up before you responded to my ticket. THANKS!!
Sign In or Register to comment.