Page 1 of 1

Opencart invoice with email

Posted: Sat Jun 20, 2015 5:53 am
by vryannn
Hi guys,

How do I get my invoice to include the customers email in there?
I am using O.C 2.0

Re: Opencart invoice with email

Posted: Sun Jun 21, 2015 3:50 am
by IP_CAM
This is not for Customer eMails, but for Admin Invoices, capable to be resent to Customers, if required.
But basically, I guess, it's important for the Admin, to know.
If this is, what your'e looking for:
In:

Code: Select all

opencart-2.0.3.1\upload\admin\view\template\sale\order_invoice.tpl
find:

Code: Select all

        <tr>
          <td><address>
            <?php echo $order['payment_address']; ?>
            </address></td>
          <td><address>
            <?php echo $order['shipping_address']; ?>
            </address></td>
        </tr>
change it to:

Code: Select all

        <tr>
          <td><address>
            <?php echo $order['payment_address']; ?>
            <br /><?php echo $order['email']; ?>
            </address></td>
          <td><address>
            <?php echo $order['shipping_address']; ?>
            </address></td>
        </tr>
or:

Code: Select all

        <tr>
          <td><address>
            <?php echo $order['payment_address']; ?>
            </address>
            <br /><?php echo $order['email']; ?>
            </td>
          <td><address>
            <?php echo $order['shipping_address']; ?>
            </address></td>
        </tr>
In the OC v.1.5.6.y Versions, it works this way, but possibly, the:

Code: Select all

$order['email']
Variable still has to be defined/declared, in the appropriate controller & language File.
Or then, it already exists, but carries another Name... (I'm not v.2. Insider!)

Try it out, but empty your cache first, to make it work, if it would...
Ernie
ipc.li/shop/

PS: it has been written about here, as well:
http://forum.opencart.com/viewtopic.php?f=72&t=145898
and it is default part of some of the popular (v.1.5.6.x) OC PDF-Printput Mod's as well.

Re: Opencart invoice with email

Posted: Tue Jun 23, 2015 10:21 am
by vryannn
That worked! Thanks!