<img src="http://neatpleats.com/image/data/NPlogo ... ><h1><?php echo $text_invoice; ?></h1>
Neat Pleats Lamps & home decor since 1993.
Scott
Attachments
Screen-shot-2011-11-11-at-3.33.15-PM.jpg (18.5 KiB) Viewed 5132 times
Neat Pleats Lamps & home decor since 1993.
And it worked great.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.
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??
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'] = '';
}
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; ?>
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.
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:This reads the logo image from the config and adds the correct path to it to the invoice template.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'] = ''; }
2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:This checks if there actually is a logo and shows the image.Code: Select all
<?php if (!empty($logo)): ?> <img src="<?php echo $logo; ?>" alt="Logo" /> <?php endif; ?>
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
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 ?
NO!benilavie wrote:ifyouseeks, ive done the first part but cant understand the second step, isnt it exactly the same file?
Thanks
Leisa
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.
Just let you know that this method works like charm with my 1.5.1.3Deadelus 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:This reads the logo image from the config and adds the correct path to it to the invoice template.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'] = ''; }
2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:This checks if there actually is a logo and shows the image.Code: Select all
<?php if (!empty($logo)): ?> <img src="<?php echo $logo; ?>" alt="Logo" /> <?php endif; ?>
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.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:This reads the logo image from the config and adds the correct path to it to the invoice template.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'] = ''; }
2: Edit /admin/view/template/sale/order_invoice.tpl and add the following code before the <h1> tag:This checks if there actually is a logo and shows the image.Code: Select all
<?php if (!empty($logo)): ?> <img src="<?php echo $logo; ?>" alt="Logo" /> <?php endif; ?>
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.
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!
the invoice() method is on line 2340 of the order.php file.. the line actually states: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
Code: Select all
public function invoice() {

Hi again.Sebcart wrote:the invoice() method is on line 2340 of the order.php file.. the line actually states: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:)
CheersI didn't get it at first too but I just searched the file for invoice() and assumed this was the oneCode: Select all
public function invoice() {
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!
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!
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'] = '';
}
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'] = '';
}
Thank you.
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 }
Any ideas anyone?
Thanks!
Philip.
Users browsing this forum: Google Adsense [Bot] and 145 guests