If you are using Power Store 3, that code is at line 13 of the checkout success page.
In power store 2, that code is at line 11.
the code changes I suggested will not have any affect on the email being sent.
you say:
I dont understand what you mean by all the changes below, which changes are those?
perhaps it would help if you sent a copy of the confirm page.