Post by neatpleats » Fri Jul 22, 2011 2:50 am

This worked on 1.5.5 as well. Just don't use the word title as the logo, use the name of your logo, ie, logo.php instead.
<img src="http://neatpleats.com/image/data/NPlogo ... ><h1><?php echo $text_invoice; ?></h1>

Neat Pleats Lamps & home decor since 1993.


User avatar
New member

Posts

Joined
Mon May 17, 2010 7:29 pm
Location - Baltimore, MD

Post by neatpleats » Sat Nov 12, 2011 4:38 am

Is there any way to add a picture of the product on the invoice next to the product description? I just need a visual helper to make sure I am pulling the right product.
Scott

Attachments

Screen-shot-2011-11-11-at-3.33.15-PM.jpg

Screen-shot-2011-11-11-at-3.33.15-PM.jpg (18.5 KiB) Viewed 5132 times


Neat Pleats Lamps & home decor since 1993.


User avatar
New member

Posts

Joined
Mon May 17, 2010 7:29 pm
Location - Baltimore, MD

Post by Nile » Sat Feb 04, 2012 3:15 am

Thanks to ifyouseek, I followed....
to add your store logo to your invoice go to admin/view/template/sale/order_invoice.tpl and add <img src="http://yourdomain.com/image/data/title.png"> just before the H1 tag as seen below.
And it worked great.

However i'm running 1.5.1.3 and theres no file called admin/view/template/sale/order_invoices.tpl to add the second string. any ideas??

Newbie

Posts

Joined
Wed Jan 11, 2012 12:41 am

Post by natsuto » Tue Feb 07, 2012 2:25 pm

The first time a single invoice generated, then somewere otherwise you have to re-add it, if you want to print duplex invoice with store signs.

Kindle Accessories


Newbie

Posts

Joined
Tue Feb 07, 2012 8:22 am

Post by Deadelus » Wed Sep 05, 2012 4:02 pm

The proper way to add your logo to the invoice while using the logo configured in the admin is as follows:

1: Edit /admin/controller/sale/order.php and add the following in the invoice() method:

Code: Select all

        if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
            $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
        } else {
            $this->data['logo'] = '';
        }
This reads the logo image from the config and adds the correct path to it to the invoice template.

2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:

Code: Select all

  <?php if (!empty($logo)): ?>
  <img src="<?php echo $logo; ?>" alt="Logo" />
  <?php endif; ?>
This checks if there actually is a logo and shows the image.

Please don't add hard coded paths to your templates, it will only annoy you in the future or when you changed your logo and forgot it was hard coded in your invoice template.

Newbie

Posts

Joined
Wed Sep 05, 2012 3:52 pm

Post by eesyboi » Tue Sep 11, 2012 11:38 pm

Deadelus wrote:The proper way to add your logo to the invoice while using the logo configured in the admin is as follows:

1: Edit /admin/controller/sale/order.php and add the following in the invoice() method:

Code: Select all

        if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
            $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
        } else {
            $this->data['logo'] = '';
        } 
This reads the logo image from the config and adds the correct path to it to the invoice template.

2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:

Code: Select all

  <?php if (!empty($logo)): ?>
  <img src="<?php echo $logo; ?>" alt="Logo" />
  <?php endif; ?>
This checks if there actually is a logo and shows the image.

Please don't add hard coded paths to your templates, it will only annoy you in the future or when you changed your logo and forgot it was hard coded in your invoice template.


Wows perfect!!!!

I was wondering how do i put the store logo inline with the heading title "INVOICE"

TastyIgniter - Open Source Restaurant Ordering and Management System


New member

Posts

Joined
Fri Aug 31, 2012 6:48 am

Post by creativecook » Mon Nov 26, 2012 11:36 pm

Hello,

I want to edit the "/admin/controller/sale/order.php" and add the code in the invoice() method:


Which line in the order.php can the invoice () method be found ?

Newbie

Posts

Joined
Tue Oct 16, 2012 7:12 pm

Post by benilavie » Mon Dec 17, 2012 2:43 pm

ifyouseeks, ive done the first part but cant understand the second step, isnt it exactly the same file?

Thanks
Leisa

Newbie

Posts

Joined
Thu Oct 25, 2012 5:52 pm

Post by i2Paq » Tue Jan 08, 2013 2:20 am

benilavie wrote:ifyouseeks, ive done the first part but cant understand the second step, isnt it exactly the same file?

Thanks
Leisa
NO!

The second file in the /admin/view/template/sale/order_invoice.tpl

Works like a charme, thanks!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Dagged » Tue Apr 02, 2013 12:43 am

Deadelus wrote:The proper way to add your logo to the invoice while using the logo configured in the admin is as follows:

1: Edit /admin/controller/sale/order.php and add the following in the invoice() method:

Code: Select all

        if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
            $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
        } else {
            $this->data['logo'] = '';
        } 
This reads the logo image from the config and adds the correct path to it to the invoice template.

2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:

Code: Select all

  <?php if (!empty($logo)): ?>
  <img src="<?php echo $logo; ?>" alt="Logo" />
  <?php endif; ?>
This checks if there actually is a logo and shows the image.

Please don't add hard coded paths to your templates, it will only annoy you in the future or when you changed your logo and forgot it was hard coded in your invoice template.
Just let you know that this method works like charm with my 1.5.1.3

Newbie

Posts

Joined
Sat Oct 06, 2012 11:53 pm

Post by Sebcart » Tue Apr 16, 2013 2:38 pm

Deadelus wrote:The proper way to add your logo to the invoice while using the logo configured in the admin is as follows:

1: Edit /admin/controller/sale/order.php and add the following in the invoice() method:

Code: Select all

        if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
            $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
        } else {
            $this->data['logo'] = '';
        } 
This reads the logo image from the config and adds the correct path to it to the invoice template.

2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:

Code: Select all

  <?php if (!empty($logo)): ?>
  <img src="<?php echo $logo; ?>" alt="Logo" />
  <?php endif; ?>
This checks if there actually is a logo and shows the image.

Please don't add hard coded paths to your templates, it will only annoy you in the future or when you changed your logo and forgot it was hard coded in your invoice template.
And it works in 1.5.5.1 - but fucked me up for a moment, until I realized everything is https in my shop.. So if you use SSL you might want to change HTTP_IMAGE in HTTPS_IMAGE and your good.

New member

Posts

Joined
Sat Sep 08, 2012 11:25 pm

Post by shanni73 » Tue Apr 23, 2013 2:36 pm

Hi

Does this add the logo to the invoice when admin are in the orders section and you click on "Print Invoice" ?

I tried it out but cant get it to work unless I have the wrong code open. Can you tell me exactly where to add it in please, when you say invoice() method, please ellaborate for me:)

Cheers

http://australianwebsitesolutions.com.au Australian Website Hosting for Opencart Shopping sites- Serious Hosting for Serious Aussie Shopping Sites!


New member

Posts

Joined
Mon Sep 27, 2010 7:26 pm
Location - Central Coast NSW

Post by Sebcart » Tue Apr 23, 2013 11:14 pm

shanni73 wrote:Hi

Does this add the logo to the invoice when admin are in the orders section and you click on "Print Invoice" ?

I tried it out but cant get it to work unless I have the wrong code open. Can you tell me exactly where to add it in please, when you say invoice() method, please ellaborate for me:)

Cheers
the invoice() method is on line 2340 of the order.php file.. the line actually states:

Code: Select all

public function invoice() {
I didn't get it at first too but I just searched the file for invoice() and assumed this was the one :)

New member

Posts

Joined
Sat Sep 08, 2012 11:25 pm

Post by shanni73 » Sun Apr 28, 2013 7:59 pm

Sebcart wrote:
shanni73 wrote:Hi

Does this add the logo to the invoice when admin are in the orders section and you click on "Print Invoice" ?

I tried it out but cant get it to work unless I have the wrong code open. Can you tell me exactly where to add it in please, when you say invoice() method, please ellaborate for me:)

Cheers
the invoice() method is on line 2340 of the order.php file.. the line actually states:

Code: Select all

public function invoice() {
I didn't get it at first too but I just searched the file for invoice() and assumed this was the one :)
Hi again.

Thanks for getting back to me on this, Im still somewhat confused, sorry to be a real pain.

But where to I add the above code, is it in between () or somewhere outside of it? Before or after.... Ihave tried different things but noe is actually working. So I thought to ask further.

Thanks again

http://australianwebsitesolutions.com.au Australian Website Hosting for Opencart Shopping sites- Serious Hosting for Serious Aussie Shopping Sites!


New member

Posts

Joined
Mon Sep 27, 2010 7:26 pm
Location - Central Coast NSW

Post by shanni73 » Mon Apr 29, 2013 10:59 pm

Hi

Is there anyone who can help me with this please? I really would like to know how to add a logo to the invoices via the admin area. When viewing the history area and you press the PRINT button, NO LOGO displays. This is also in the emails on for returns and when you update a order, NO logo goes with the emails??

I would have thought this would be something that should be normal, but for some reason it is not in OC.

Any detailed direction would be appreciated.

Thanks

http://australianwebsitesolutions.com.au Australian Website Hosting for Opencart Shopping sites- Serious Hosting for Serious Aussie Shopping Sites!


New member

Posts

Joined
Mon Sep 27, 2010 7:26 pm
Location - Central Coast NSW

Post by Sebcart » Thu May 02, 2013 11:31 pm

It should look like this:

Code: Select all

  	public function invoice() {

            if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
                $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
            } else {
                $this->data['logo'] = '';
            }
or if you have a secure SSL site:

Code: Select all

  	public function invoice() {

            if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
                $this->data['logo'] = HTTPS_IMAGE . $this->config->get('config_logo');
            } else {
                $this->data['logo'] = '';
            }
		

New member

Posts

Joined
Sat Sep 08, 2012 11:25 pm

Post by Patrikiden » Tue Aug 06, 2013 7:00 am

Hello, i'v got this working. But i would also like to have the same function for customers. So when a logedin Customer goes to Order history and click the print button (also a addon script) then the Logo should be at the top of the printed out Order information. Any idea?

Thank you.

New member

Posts

Joined
Tue Aug 06, 2013 6:55 am

Post by appaji » Tue Aug 20, 2013 1:38 pm

Thank you "ifyouseek". It worked for me also..

Newbie

Posts

Joined
Thu Jan 17, 2013 5:34 pm

Post by philipeft » Fri Aug 30, 2013 5:40 am

Hi,
I tried this but it didnt work for me in version 1.5.6

I got the error... Notice: Use of undefined constant HTTPS_IMAGE - assumed 'HTTPS_IMAGE' in /home/sites/phoenixeft.co.uk/public_html/store3/admin/controller/sale/order.php on line 2354

I tried using HTTP and HTTPS in the code - with the same result.

I added the code snippet on the next line after the... Invoice() { in the file.

Code was... (with line numbers added after)

Code: Select all

2353   if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
2354                    $this->data['logo'] = HTTP_IMAGE . $this->config->get('config_logo');
2355                } else {
2356                    $this->data['logo'] = '';
2357                }
I do have a store logo set up on the system, which displays ok on the front-end.

Any ideas anyone?

Thanks!
Philip.

Newbie

Posts

Joined
Sun Aug 18, 2013 7:47 pm

Post by TAC » Tue Oct 22, 2013 4:16 am

Do we still have to do this in 1.5.x?

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England
Who is online

Users browsing this forum: Google Adsense [Bot] and 145 guests