Automatic attaching invoices

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #56880

Hello,

there was this note in the last Chanhe Log New features for HikaShop 1.5.8:

A separate PDF invoicing plugin as been released allowing you to automatically attach the invoices to the orer confirmation email (coming in a few days)

Is this already working? If yes, is there any documentation how to set the invoices up?
If not yet, when is it going to work?

Thanks
Vaclav

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #56885

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

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #57250

Thanks Nicolas...already bought :-)

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

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #57274

Hi Nicolas,

I installed the invoice, allowed the plugin but nothing attached to any email. Are there any other settings I need to set?

Thanks
Vaclav

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #57339

No it's automatic.

Note that the invoice will be attached to the order status notification email which is sent when the order is confirmed. It won't add it in the order creation notification email. So you should check that the order is confirmed and that you're looking at the correct email.

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

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #57389

Thanks. It is already working.

But there is a problem with the font - it does not show some Czech letters in the invoice. Is there any option how to set local fonts for invoices?

Thanks

Vaclav

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #57428

It will need additional fonts.
Could you download tcpdf here:
sourceforge.net/projects/tcpdf/files/

Then in the tcpdf/fonts folder, copy the files to the folder plugins/hikashop/attachinvoice/attachinvoice/_tcpdf_5.0.002/fonts
That should hopefully help.

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

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #58235

Hi Nicolas,

thanks for your reply but it didnt help. It is still the same... Any other idea?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #58309

We worked on the plugin so that it can support the font selection and added additional fonts.
I did a test today with the czech language and it's working with the "freemono" font.
I invite you to download again the plugin on our website, install it on yours and configure the font in the options of the plugin and it should hopefully work for you too.

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

  • Posts: 95
  • Thank you received: 1
12 years 3 months ago #61700

I downloaded new plugin, uninstalled the old one, installed the new one and tried to change the font - I cant find any option, where I could set the font.

The invoice is still with "?" instead of Czech letters.

Could you please help?

Thanks

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

  • Posts: 5
  • Thank you received: 1
11 years 4 months ago #112092

Hello,

I bought and installed attachinvoice pluging yesterday, but can't get it to work. I searched the forum but found nothing helpfull.
I checked invoice generatiion from the backend and get an error message there,

"ERROR n°1 : The tag <BR> does not yet exist.If you want to add it, you must create the methods o_BR (for opening) and c_BR (for closure) by following the model of existing tags.If you create these methods, do not hesitate to send me an email to This email address is being protected from spambots. You need JavaScript enabled to view it. to included them in the next version of HTML2PDF."

so maybe this is the core problem but I did not find anything on that either.

Any idea?

Thanks

Michael

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 4 months ago #112149

Hi,

It seems that you have another extension already loaded on your website which uses the same HTML2PDF library but which has an older version which doesn't handle br tags. In order for the page processing not to break, the system tries to use it but fails as that old version does not support the br tags that are used in the invoice template.

You will have to find that other extension and disable it and it should work fine after that.
If you can tell us which extension it is, once you find it, we can pontetially see how we can avoid that issue with it.

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

  • Posts: 5
  • Thank you received: 1
11 years 4 months ago #112680

Hi,

thanks for your answer. I have now uninstalled most of the extensions and removed the code on a test system but the error still comes up. Then I uninstalled the attachinvoice plugin I can create invoices from the backend order list. Does the plugin overwrite the stanard invoice creation? I have searched the code for 'html2pdf' and 'tcpdf' but these strings only apear in the attachinvoice plugin code. What else can I search?

Thanks

Michael

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 4 months ago #113047

Yes, the plugin override the standard invoice creation. It's its role.

Let's try a different approach then.

Change the lines:
if(!class_exists('HTML2PDF')) include(dirname(__FILE__).DS.'attachinvoice'.DS.'html2pdf.class.php');

to:
include_once(dirname(__FILE__).DS.'attachinvoice'.DS.'html2pdf.class.php');

in the file plugins/hikashop/attachinvoice/attachinvoice.php and that will display an error message if the system tries to redeclare the HTML2PDF class and it will tell us what file already has it declared.

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

  • Posts: 5
  • Thank you received: 1
11 years 4 months ago #113060

Thanks, did this change but still the same message no other error! Cleared server cache, browser cache restarted the server, still the same. Moved this file away to make sure this is the one that is executed and yes then the error is gone.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 4 months ago #113113

Mmm, ok.

Did you modify the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php in any way ?

Could you add the code:

protected function _tag_close_BR($param, $curr = null)
				{
					return true;
				}
just before the line:
protected function _tag_open_BR($param, $curr = null)
of the file plugins/hikashop/attachinvoice/attachinvoice/html2pdf.class.php and try again ?

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

  • Posts: 5
  • Thank you received: 1
11 years 4 months ago #113134

Strange, I cannot find this line in this file. the only occurence of _tag_open_BR is plugins\hikashop\attachinvoice\attachinvoice\html2pdf.class.php.
I reinstalled the testsystem and the attachinvoice plugin to make sure there are no changes to these files.
So maybe something is wrong with the zipfile that I downloaded.

Thanks

Michael

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 4 months ago #113150

I'm not following you.
We're talking about the same file. So I don't see the problem ?

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

  • Posts: 5
  • Thank you received: 1
11 years 4 months ago #113159

Sorry I got confused with the filenames.

Now I added the code to the correct file and it works.

Thanks a lot!

Michael

The following user(s) said Thank You: nicolas

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

Time to create page: 0.099 seconds
Powered by Kunena Forum