Changing the online receipt

sc6688sc6688 Member
I am searching for information on editing the online receipt. I have found this:
https://docs.foxycart.com/v/2.0/receipt#what_s_included_on_the_receipt

However it does not provide the information taht i am after. All I am wanting to do at this stage is to:
1) Add the full business name
2) Change the words "Receipt" to "Tax Invoice"
3) Add the company ABN (company number)
4) Add the company address.

I have figured out how to chenage the email receipt but teh online receipt is a mystery.

I can see this code in the "custom" area of receipts area:
{% embed 'receipt.inc.twig' %}

But have no idea how I can customise it.

Is there an example template that I can modify or is there any other information you can provide to help me make these changes.

Thanks,

Stuart



Tagged:
Comments
  • sc6688sc6688 Member
    From further research I have found this:
    https://github.com/FoxyCart/2.0-templates/blob/master/receipt.inc.twig

    and was wondering how this can be incorporated into the receipt.

    I have tried pasting the code into the receipt template but I am getting an error on line 307 {% endembed %}.

    It looks like I should be able to edit the receipt.inc.twig file as

    Any info on what I am doing wrong here
  • fc_adamfc_adam FoxyCart Team
    @sc6688,

    Sorry you weren't able to find some information about working with the templates. Hopefully we can help point you in the right direction.

    To start off with - we have some documentation around our templates available on our wiki, both for intermediate edits (like incorporating your own design) detailed here, and more in-depth changes within the raw templates detailed here.

    The Github link you found is indeed the raw base template of the receipt. That's the code that's currently being output in the default receipt template you see in the admin by these lines of code:
    {% embed 'receipt.inc.twig' %}
    {% endembed %}
    If you replaced those two lines with the contents of the receipt.inc.twig file - that would technically not change anything in terms of what you see output on the page - but you could make in-depth changes to the template markup as needed.

    That said, taking that approach is fairly full-on, and means that you're locked to that version of the receipt template, and restricted from receiving future updates we roll out to the template. As such, we wouldn't recommend replacing the embed tags with the raw include template like that unless you were intending to do some deep changes.

    Instead - for the changes you're wanting to make - there are some cleaner ways to adjust the template while still allowing you to stay on the latest version of the template.

    For part 2 of your changes - this can be achieved from the "Language" section of your store's FoxyCart administration - all customer facing language strings can be edited from this section as much as you need.

    For your other changes - how you approach them will depend on where you want to have them output. Could you confirm that for us, and then we'll follow up with some additional details for you.
Sign In or Register to comment.