How To: Add Payment Method to Order Confirmation Email
Posted by , Last modified by Wayne Smith on 14 October 2016 11:27 AM


This will work for stores on PR8 Update 9 or newer. Note that this will require editing the code on several pages. These edits are low-risk but if you feel uncomfortable with editing code in your store then we advise you to seek help from a developer. If you feel you've made a mistake at any point in the process you can use the built-in Versions dropdown below each section of template code to select a previous working version of the template, then click Recall to bring up that version, and finally click Update to revert the page back to a date+time before the changes were made. 


1) Click Utilities in your admin's lefthand menu and verify that the Custom Fields tab exists at the top of this screen. If it does not, check the box next to it in the list and click Update. Click the Custom Fields tab.

2) Click the New Field button in the top right, give it a Type of "Order Field", Code of "payMethod", Name of "Payment Type", leave the rest default and click Add.

3) Edit the OPAY page in your admin and add this just above the line saying </form>:
<input type="hidden" name="payMethod" value="&mvt:payment:desc;" />

4) Edit the INVC page in your admin, click the Items tab and assign the customfields item by checking the box next to it and then clicking Update, and then go to the Page tab and add this to the top of the page:
<mvt:item name="customfields" param="Write_Order(l.settings:order:id,'payMethod',g.payMethod)" />

5) Edit the email template "Order Confirmation: Merchant", assign the customfields item to the page, and add this where you'd like the payment method to appear:
<mvt:if expr="g.payMethod">
  Payment Type: &mvt:global:payMethod;<br />
  <mvt:item name="customfields" param="Read_Order(l.settings:order:id,'payMethod',l.settings:payMethod)" />
  <mvt:if expr="l.settings:payMethod">
    Payment Type: &mvt:payMethod; <br />

You can optionally place the same code on the "Order Confirmation: Customer" email template, instead/in addition, if you'd like.

Got stuck?

If you require further assistance, please e-mail with a link to both this article and to your store, and a description of your problem. 

(18 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako