Can Logos be added to invoices

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 4 weeks ago #28697

This thread is about adding a logo to invoices and not to emails.
The invoice can be displayed when you edit an order via the sales listing.

If you want to add your shop address and/or logo in the emails sent to your users, you will have to edit the emails via the menu System->Emails (Business edition only) and add it there.

It also seems that your email client is only displaying the text version of your emails (the email you pasted here is a text version) and text emails cannot contain images, only the HTML version can. Normally, any email client should be able to display the HTML version of an email.

Please Log in or Create an account to join the conversation.

  • Posts: 60
  • Thank you received: 2
12 years 9 months ago #40950

Hi Nicolas

These users seem to be ex-Virtuemart users like me.

We had an option there just where you set the adress for the Shop to add an image logo for our shop.

This logo would appear in the order e-mails, the orders itself and the Invoices.

Please consider adding this option, not a big issue but makes a shop look much more professional.

Regards

Last edit: 12 years 9 months ago by manuxx.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
12 years 9 months ago #41179

Hi,

There is already such option in the main tab of the configuration. By default there is just an address, but you can also add HTML to it and thus you have add your logo there.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
11 years 5 months ago #109695

Sorry to revive an old thread, but it still applies.

Nicolas, I tried editing the view order/invoice.php via Display -> Views to edit the shipping invoice. I added some garbage to the top of the view then went to the customer view and clicked the shipping invoice button and did not see my chagnes show up. I added the following code to the bottom of the view:

<?php if($this->invoice_type!='full') {
    <tr>
    <td>
    <p>Customer Signature______________________________________</p>
  </td>
  </tr>
    <?php } ?>

However it's not showing up. Is there a different file I should be editing? FYI I am using the PDF plugin, but have already (successfully) edited the PDF invoice layout. I'm now specifically referring to the shipping invoice.

Thanks,
Ruggero

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
11 years 5 months ago #109702

It's probably that you didn't edit the file for the correct template. Please make sure that you're editing it for your backend template and not another one.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
11 years 5 months ago #109705

Dead right - silly mistake. I was editing the view for my frontend template, not my selected backend template. :blush:

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 3 months ago #211795

Hi all,
I have a similar problem, I'd like to have a logo above the invoice.
I have tried with:
an IMG tag in Config Shop Addresse like that:

<img src="http://www.myshop.it/images/logo.jpg" />
Company name
Company address
ZIP code Country

or writed in the invoice.php file too:
...
<div class="storeaddress">
	<img src="http://www.myshop.it/images/logo.jpg" />
		<?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>
...

What I get is no PDF attached in the e-mail and if I try to print on Front-End (User printing Invoice) I see:
Fatal error: Call to undefined method HTML2PDF_exception::get() in /home2/----/----/libraries/legacy/error/error.php on line 536.

I've tried with and without protocol http://www.... and without closing backslash tag <.../> <...>.
Not works

Without image tag <img src= ..... /> I get the PDF invoices without any problems on front-end (print) and it is attached by the e-mail regularly.

Have you an idea how to solve it? Have you ever seen it?
Thanks in advance.

Joomla ver. 3.4.3
HikaShop ver. Essential: 2.5.0
HikaSerial ver. 1.9.1
PHP ver. 5.5.27

PS: I like your HikaShop and HikaSerial (wow!) ... very nice work, much better as VirtueMart (new versions are awful !!!!)

Last edit: 9 years 3 months ago by fab966. Reason: Better showing

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 3 months ago #211801

PSPS =====
I've now tried in the Main Shop Config, by Shop addresse:

<b>Company name</b>
Company address
ZIP code Country
results: everythings works good on User print Invoice and attached PDF by email.

<a href="#">test</a>
Company name
Company address
ZIP code Country
results: everythings works good on User print Invoice and attached PDF by email.

<span class="color:#F00">Company name</span>
Company address
ZIP code Country
results: everythings works good on User print Invoice and attached PDF by email.


but if I write:
<img src="http://www.myshop.it/images/logo.jpg" />
Company name
Company address
ZIP code Country
and than I click on "Print Invoice" on front-end (User print Invoice) I get:
Fatal error: Call to undefined method HTML2PDF_exception::get() in /home2/mewekard/public_html/libraries/legacy/error/error.php on line 536

???

Last edit: 9 years 3 months ago by fab966.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 3 months ago #211803

Hi,

I've uploaded a new version of the plugin which should better handle the exceptions when a problem occur. That way you'll get an error message which will better explain what is the problem.
Please download again the PDF invoice plugin install package on our website and install it on yours and try again and report the error messages you get.
Also, in the src attribute of the img tag, you might want to put the path of the image on the hard drive (you can try both relative or absolute) instead of the link as the link won't work if the web server settings do not allow the PDF library to access links. Or you can also check your server settings regarding that.

Last edit: 9 years 3 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 3 months ago #211897

Thank you Nicolas,
I suspect it depends on php.ini settings, I can't have allow_url_fopen to ON... only OFF (Provider's choice).
In the html2pdf.class.php I've found this:

protected function _drawImage($src, $subLi=false)
	{
		// get the size of the image
		[b]// WARNING : if URL, "allow_url_fopen" must turned to "on" in php.ini[/b]
			$infos=@getimagesize($src);
			// if the image does not exist, or can not be loaded
			if (count($infos)<2) {
				// if the test is activ => exception
				if ($this->_testIsImage) {
					throw new HTML2PDF_exception(6, $src);
					}

				// else, display a gray rectangle
					$src = null;
					$infos = array(16, 16);
			}
...
...

Is for this reason that it happens only if I insert the HTML tag <img ... /> ???
I try with your updated PlugIn anyway.

Thanks a lot for your answer and once more congratulations for your software (really a good work).

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 3 months ago #211923

Hi,

Yes, it probably comes from allow_url_fopen. It has to be turned on if you enter a URL for the images.

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum