- Posts: 14
- Thank you received: 2
Company logo in send pdf invoice plugin
- Astrostar59
-
Topic Author
- Offline
Less
More
11 years 9 months ago - 11 years 9 months ago #186323
by Astrostar59
Company logo in send pdf invoice plugin was created by Astrostar59
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5.8
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Safari 7 Firefox 34
I just bought the Hikashop 'send pdf with order' plugin. It works but the layout of the pdf is poor. Is there a way to include the company header or company logo in the pdf?
Is there a way to up the size of the text? I updated the CSS php doc and got the text to go bold but the size isn't going bigger even though I set front size from 10 to 15 px.
Update (I found an old post here about this)
I went into 'attach invoice' folder and the doc 'invoice.php' And added a simple table at the top with my company logo. I set image paths as full http url. The pdf now does not appear on the sent email. Any ideas??
-- Joomla version -- : 2.5.8
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Safari 7 Firefox 34
I just bought the Hikashop 'send pdf with order' plugin. It works but the layout of the pdf is poor. Is there a way to include the company header or company logo in the pdf?
Is there a way to up the size of the text? I updated the CSS php doc and got the text to go bold but the size isn't going bigger even though I set front size from 10 to 15 px.
Update (I found an old post here about this)
I went into 'attach invoice' folder and the doc 'invoice.php' And added a simple table at the top with my company logo. I set image paths as full http url. The pdf now does not appear on the sent email. Any ideas??
Last edit: 11 years 9 months ago by Astrostar59.
Please Log in or Create an account to join the conversation.
11 years 9 months ago - 11 years 9 months ago #186326
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Company logo in send pdf invoice plugin
Hi,
The best is to create an override for the "invoice.php" of the pdf invoice plugin.
Please see these threads:
www.hikashop.com/forum/2-general-talk-ab...nvoice-pdf-logo.html
www.hikashop.com/forum/4-how-to/66908-ad...o-attachinvoice.html
I don't see why the PDF wouldn't be sent after the modification of the invoice.php file. If there was an error created by the change, you shouldn't even get the email. But download again the PDF invoice install package to replace the invoice.php with the default one and see if that fixes the issue. If so then it means that it really came from your modifications and we would need to know what exact modifications you did to be able to tell you what's wrong with them.
Regards,
The best is to create an override for the "invoice.php" of the pdf invoice plugin.
Please see these threads:
www.hikashop.com/forum/2-general-talk-ab...nvoice-pdf-logo.html
www.hikashop.com/forum/4-how-to/66908-ad...o-attachinvoice.html
I don't see why the PDF wouldn't be sent after the modification of the invoice.php file. If there was an error created by the change, you shouldn't even get the email. But download again the PDF invoice install package to replace the invoice.php with the default one and see if that fixes the issue. If so then it means that it really came from your modifications and we would need to know what exact modifications you did to be able to tell you what's wrong with them.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 11 years 9 months ago by nicolas.
Please Log in or Create an account to join the conversation.
- Astrostar59
-
Topic Author
- Offline
Less
More
- Posts: 14
- Thank you received: 2
11 years 9 months ago - 11 years 9 months ago #186499
by Astrostar59
Replied by Astrostar59 on topic Company logo in send pdf invoice plugin
Hello Jerome
I sent a reply to the email that I got from you with the post above. I will post here as well to be sure you get it.
I read those posts, and I have only added my logo jpg (11K) directly under the Invoice number, so in white space. I used http full path to the image but it won't load in invoice as a pdf sent via the 'order completed' email, or when I go into 'orders' in admin and click the invoice tab on one of my recent orders. In that case it says Error 6 unable to load image .......
Here is my code (top part of the doc) in the invoice.php. I have not altered anything other than add the image.
Please can you help?
I sent a reply to the email that I got from you with the post above. I will post here as well to be sure you get it.
I read those posts, and I have only added my logo jpg (11K) directly under the Invoice number, so in white space. I used http full path to the image but it won't load in invoice as a pdf sent via the 'order completed' email, or when I go into 'orders' in admin and click the invoice tab on one of my recent orders. In that case it says Error 6 unable to load image .......
Here is my code (top part of the doc) in the invoice.php. I have not altered anything other than add the image.
Please can you help?
Code:
<?php
/**
* @copyright Copyright (C) 2009-2012 ACYBA SARL - All rights reserved.
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?>
<style type="text/css">
<!--
.invoicetitle{ text-align:center;font-size:30px; padding-top:40px;padding-bottom:40px}
legend { padding:5px 10px; background-color:#5471B5;color:white;font-weight:bold;border-color:#ccc}
fieldset { padding:10px; border-color:#ccc;}
div.date{text-align:right;color:#333;}
.storeaddress{
color:#333;
}
.addresses{padding-top:50px;}
.addresses td{padding-left:50px;}
.addresses fieldset {float:left;}
table.products{margin:auto;margin-top:60px;width:580px;border-collapse:collapse}
.price{text-align:center;}
.products td, .products th{border:1px solid #ccc;padding:7px 4px;}
.products th{background-color:#5471B5;color:white;}
td.newarea{text-align:right;padding-right:20px;}
tr.total{font-weight:bold;}
.products tr.limitation td{background-color:#ccc;padding:1px 0px;}
.hikashop_order_custom_fields_fieldset{margin-top : 20px;}
.footer{font-size:10px;color:#aaa;text-align:center;}
-->
</style>
<page style="font-size: 12px" backtop="14mm" backbottom="14mm" backleft="10mm" backright="10mm">
<page_footer>
<div class="footer">
<?php echo str_replace(array("\r\n","\n","\r"),array('<br/>','<br/>','<br/>'),$this->params->get('footer')); ?>
</div>
</page_footer>
<div class="storeaddress">
<?php
$store = str_replace(array("\r\n","\n","\r"),array('<br/>','<br/>','<br/>'),$config->get('store_address',''));
if(JText::_($store)!=$store){
$store = JText::_($store);
}
echo $store;
?>
</div>
<p>
<?php if(empty($order->order_invoice_number)){
$order->order_invoice_number = $order->order_number;
}
if(empty($order->order_invoice_created)){
$order->order_invoice_created = $order->order_created;
} ?>
</p>
<p><img src="http://www.glasswipeboardco.co.uk/design_images/logo.jpg"/></p>
<div class="invoicetitle"><?php echo JText::_('INVOICE').' n° '.$order->order_invoice_number; ?></div>
<div class="date"><?php echo JText::_('DATE').': '.hikashop_getDate($order->order_invoice_created,'%d %B %Y ');?></div>
Last edit: 11 years 9 months ago by Jerome. Reason: [code] is nice !
Please Log in or Create an account to join the conversation.
11 years 9 months ago #186506
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Company logo in send pdf invoice plugin
Hi,
A path is not an url ; the two things are very different.
An absolute path is a path in your server, something to access to a file.
Like : "/var/www/mywebsite/images/myimage.jpg"
You can also use a relative path where the start point will be the base of your joomla website.
Like : "/images/myimage.jpg"
Kind regards,
A path is not an url ; the two things are very different.
An absolute path is a path in your server, something to access to a file.
Like : "/var/www/mywebsite/images/myimage.jpg"
You can also use a relative path where the start point will be the base of your joomla website.
Like : "/images/myimage.jpg"
Kind regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Astrostar59
-
Topic Author
- Offline
Less
More
- Posts: 14
- Thank you received: 2
11 years 9 months ago #186673
by Astrostar59
Replied by Astrostar59 on topic Company logo in send pdf invoice plugin
Hi Jerome
Yes, I tried both paths. I have it set now as:
/images/logo.jpg in the 'invoice.php.
But it won't work. I get in Admin:
6 - An error has occurred.
ERROR n°6 : Impossible to load the image www.glasswipeboardco.co.uk/images/logo.jpg
Return to Control Panel
Can you supply me the doc 'invoice.php' with an image dropped into the code. Anywhere near the top of the page is fine.
I can then use that. I have drawn a blank here, it is refusing to work for me........ www.hikashop.com/media/kunena/emoticons/dizzy.png
Yes, I tried both paths. I have it set now as:
/images/logo.jpg in the 'invoice.php.
But it won't work. I get in Admin:
6 - An error has occurred.
ERROR n°6 : Impossible to load the image www.glasswipeboardco.co.uk/images/logo.jpg
Return to Control Panel
Can you supply me the doc 'invoice.php' with an image dropped into the code. Anywhere near the top of the page is fine.
I can then use that. I have drawn a blank here, it is refusing to work for me........ www.hikashop.com/media/kunena/emoticons/dizzy.png
Please Log in or Create an account to join the conversation.
11 years 9 months ago #186675
by nicolas
Replied by nicolas on topic Company logo in send pdf invoice plugin
Hi,
Here is a test I made on my end:
take.ms/zgnR4
And you can see it's really easy to add in the invoice.php file:
take.ms/L8eyJ
If that doesn't work, the it must come with the configuration of your web server not allowing the PDF library to load the image URL. I would recommend to contact your server administrator/hosting company for help to allow the website to be able to load the images like that.
Here is a test I made on my end:
take.ms/zgnR4
And you can see it's really easy to add in the invoice.php file:
take.ms/L8eyJ
If that doesn't work, the it must come with the configuration of your web server not allowing the PDF library to load the image URL. I would recommend to contact your server administrator/hosting company for help to allow the website to be able to load the images like that.
Please Log in or Create an account to join the conversation.
Time to create page: 0.159 seconds