Round Rock / Austin, Texas
Drupal Web Developer

Adding Custom Fields to Ubercart and Getting them to Display on Invoices and Emails

Adding Custom Fields to Ubercart and Getting them to Display on Invoices and Emails

Ubercart Extra Fields Module

1) Install the UC Extra Fields module (might need the UC Addresses field module too???)

2) Under Store >> Configuration >> Countries and Addresses >> Address Fields >> Add an Address Field, add your new field (i.e. 'referrer' drop down list)

3) Look on your server's file system under /sites/modules/ubercart/uc_order/templates

4) Make a copy of the following files into your theme's template directory:

uc-order--admin.tpl.php
uc-order--customer.tpl.php

5) Clear your cache to make sure the system is seeing your new template files

6) Add this code snippet where you want your custom field to show up.  (You will need to change the field name to match the field name you set up)

<?php print $uc_addresses_billing_ucxf_referrer; ?>
<?php print $uc_addresses_shipping_ucxf_referrer; ?>

7) The easiest way to test is to start with the CUSTOMER one first.

Open an exisiting order. 
Click the "Invoices" tab.
Click the "Printable Invoice" tab. 
Look for your customizations there.