title: How to add custom fields to the order_invoice.tpl, OpenCart 2.0
body: <p>I have searched far and wide for this answer on the web, and nobody seems to have an answer. I know that in OpenCart 2.0 you have the ability to add custom fields in the registration process. I have added 3. I see that they are showing up in the Order Details section of an order, but I need them to show up on the printed invoice too. The code that outputs the custom fields in the order_info.tpl is as follows:</p>
  
  <pre><code>&lt;?php foreach ($account_custom_fields as $custom_field) { ?&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $custom_field['name']; ?&gt;:&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $custom_field['value']; ?&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>I attempted to just insert that into order_invoice.tpl but I am receiving the error:</p>
  
  <blockquote>
    <p>Notice: Undefined variable: account_custom_fields in /home/raphaelseventworks.com/www/ncbaorders/admin/view/template/sale/order_invoice.tpl on line 64Warning: Invalid argument supplied for foreach() in /home/raphaelseventworks.com/www/ncbaorders/admin/view/template/sale/order_invoice.tpl on line 64</p>
  </blockquote>
  
  <p>I don't know enough about OpenCart to know which files make up the order_invoice.tpl. Can someone help me out? I believe one answer I saw to this same question is, "It's difficult." I know it's not a simple process, but if you can point me to the right files, I would greatly appreciate it!</p>