Zen Cart Logo

pdf Invoice 3

Views: 14,394

Results 1 to 20 of 39
31 Jul 2009, 4:56 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

pdf Invoice 3

Hi,
I am trying out this module

http://demo.zen-cart.at/docs/rl_invoice3/index_en.html

to produce pdf invoices automatically, and have them available for download by the customer.

I am surprised to not find any reference to this in the forum, is anyone using this module?

I have a problem with it at the moment in that it creates pdfs on demand from the Admin but does not create them automatically when an order is made,

regards
Steve

16 Aug 2009, 8:28 AM
#2
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: pdf Invoice 3

Hi Steve,

Have you made any progress with this? I am trying this mod out, too, but have been having a few problems including the one you mentioned. I posted about another problem, have you experienced this, too? http://www.zen-cart.com/forum/showthread.php?t=134828

16 Aug 2009, 10:11 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: pdf Invoice 3

Hi,
I pm'd the author but received no response, so I am documenting my findings/changes and will post this up as a contribution with minor changes when I am finished.

I think we should make this the support thread for the module.

Have you noticed that in admin-tools there is a new section for testing the module? It is not documented at all, I found it by accident!

Your problem

I just installed it and it works great apart from in the account order history page, when you click the link to download the pdf invoice it creates an alert box with the message:

C:\DOCUME1\Main\LOCALS1\Temp\Y2YkldCz.pdf.part could not be saved, because the source file could not be read.

This is from a live, remotely hosted test site.

The pdf is being created properly, I can go to root/pdf and see the pdf file and download it with an ftp program and it is all correct, but for some reason trying to download it through a browser won't work. I have tried with FF 3.x and IE8 with the same (non)results. I did notice that the path was different in the different browsers, in FF it is:

my_site.com/index.php?main_page=rl_invoice3&fn=75843_99ba4a0dfbdbf6c53ac2f9fd3c6db4af.pdf&or der=75843

and in IE8 it is:

my_site.com/index.php?main_page=rl_invoice3&zenid=6e49c0e4a47ad0f7438c283dc1105e24&fn=75843_ 99ba4a0dfbdbf6c53ac2f9fd3c6db4af.pdf&order=75843

For some reason it puts the zenid in with the link in IE8. Could all of this have something to do with the problem?

I would encourage folks to try this out, it looks like it has nice features, including a drag and drop template editor and ajax features.

I don't know if what I have experienced are bugs or not. I tried this in a fresh 1.3.8a install with all patches and bug fixes applied to rule out my heavily modified 1.3.7.1 and it is the exact same problem. I followed the installation and configuration instructions. If I go to admin>customers>orders and then click on the pdf invoice button it will open a new tab with the correct pdf invoice but it uses this path:

my_site.com/admin/rl_invoice3.php?oID=75843

Any suggestions? I can't ask on the zen cart German forum since I don't speak German and can't even find a thread about this mod because of the language barrier.

This may be the answer:
in Zen-Cart Admin-Configuration-Attribute Settings

for WINDOWS servers:
a) "Download by Redirect" - MUST be set to FALSE
b) Streaming - TRUE is better. See Zen Cart FAQ https://www.zen-cart.com/tutorials/index.php?article=292

for UNIX servers:
a) "Download by Redirect" - Either setting should work

If:
"Download by Redirect" is set to TRUE

then the directory
/catalog/pub MUST have read/write permissions 777 or 755

as the module creates a randomly-named folder from which the client downloads a copy of the pdf.

regards
Steve

16 Aug 2009, 5:30 PM
#4
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: pdf Invoice 3

torvista:

Hi,
I pm'd the author but received no response, so I am documenting my findings/changes and will post this up as a contribution with minor changes when I am finished.

I think we should make this the support thread for the module.

Have you noticed that in admin-tools there is a new section for testing the module? It is not documented at all, I found it by accident!

Your problem

This may be the answer:
in Zen-Cart Admin-Configuration-Attribute Settings

for WINDOWS servers:
a) "Download by Redirect" - MUST be set to FALSE
b) Streaming - TRUE is better. See Zen Cart FAQ https://www.zen-cart.com/tutorials/index.php?article=292

for UNIX servers:
a) "Download by Redirect" - Either setting should work

If:
"Download by Redirect" is set to TRUE

then the directory
/catalog/pub MUST have read/write permissions 777 or 755

as the module creates a randomly-named folder from which the client downloads a copy of the pdf.

regards
Steve

Hi Steve,

That was it! I needed to set the permission for the pub directory to 777 and now it works as expected! Thank you!!!

I noticed the template testing feature and the font testing. I like this mod, and I like the drag and drop template editing.

I agree that the pdf should be created automatically upon ordering. And I have "send pdf invoice with order" set to 1 in admin>configuration>pdf invoice3 but no pdfs are sent with the order confirmation emails. Have you had any success getting this to work?

I am trying this out alongside the pdf order center 1.2.1 to evaluate which one we would like to use. I like features from both but pdf invoice3 is much simpler, if I can get it to autogenerate and attach on order confirmation emails I think we will go with it.

I will certainly do what I can to help support this mod, especially after I have gotten more familiar with it.

Thanks again for your help!

16 Aug 2009, 8:38 PM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: pdf Invoice 3

Hi,
glad to know you have fixed it. It took me hours to figure out what was happening!

The only other "faults" I have found are

  1. /templates/tpl_account_history_info_default.php

has two unencoded ampersands

change:

$pa = zen_href_link('rl_invoice3', '', 'SSL') . '&fn=' . $v['fn'] . '&order=' . $_GET['order_id'];
to:
$pa = zen_href_link('rl_invoice3', '', 'SSL') . '&fn=' . $v['fn'] . '&order=' . $_GET['order_id'];
  1. There is a hard-coded error message in rl_invoice3/header_php.php which should be replaced with a define:
    for example
if (!file_exists($pdfName)) die(RL_INVOICE3_FILE_MISSING . $downloads->fields['orders_products_filename'])

add to catalog/includes/languages/english/extra_definitions/rl_invoice3.php

define('RL_INVOICE3_FILE_MISSING', 'ERROR - Unable to find file.<br />Please contact us directly to report this error.<br />Thank You<br /><c/f: ');

I have not had time to investigate the auto-emailing function yet, but given the quality of this module I am sure it will be a configuration issue/user error!.

regards
Steve

23 Aug 2009, 6:52 PM
#6
interskill avatar

interskill

New Zenner

Join Date:
Nov 2008
Posts:
11
Plugin Contributions:
0

Re: pdf Invoice 3

Hi this mod sounds exactly what I am looking for i.e. to send pdf (or html) invoices automaticaly when a customer pays.
Can anybody point me in the direction of the mod download please!!

Thanks

30 Oct 2009, 1:00 PM
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: pdf Invoice 3

Hi,

this mod is difficult to find since it disappeared from the link in my first post but it is in sourceforge if you look inside the file list for Zen Cart German:

http://sourceforge.net/projects/zencart-german/files/

and for german-speakers or those good at guessing like me, it is on a german forum, but you will have to register to download anything from here:

http://www.zen-cart.at/zcvb/forum/downloads.php?action=ratelink&catid=8&linkid=149

Note that the module is in english and german.

There are other interesting modules on this forum that don't exist here, like Mega_Orders_1.3 which is a merge of 4 order editing modules (not tried it yet).

regards
Steve

30 Oct 2009, 2:34 PM
#8
gezaazy avatar

gezaazy

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

Re: pdf Invoice 3

has anyone got the auto-email function to work?

EDIT: never mind that one. I think I figured that out.

Had to change "send by orderstatus...." to 1

30 Oct 2009, 3:45 PM
#9
gezaazy avatar

gezaazy

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

Re: pdf Invoice 3

Does anyone know how to change the PDF file layout?

I have changed the background already but I need to make lot of changes on the layout (move things aroung, add/remove things etc)

2 Nov 2009, 5:46 PM
#10
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: pdf Invoice 3

Hi GezaazY,
I cannot get the pdfs to be attached.

Can you confirm what settings you are using in the admin?

  1. Send by orderstatus greater/equal than:
    the default is 3|100 but I don't understand what the |100 refers to.
    I assume you have this set to just "1" with no bar?

  2. Send pdf invoice with order
    obviously "1".

Anything else to make it work?

thanks
Steve

2 Nov 2009, 6:01 PM
#11
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: pdf Invoice 3

Hi,
to change the layout I gave up on the admin tools and played around directly with the values in
\includes\classes\class.rl_invoice3.php

from here

  function makeAddr() {

downwards is the meat.

You can set the address locations in the admin but can control the rest of the fields with things like this

$this->pdf->SetY(50);

similar for X.

I don't know whether this is the correct approach as everything else in this mod is impressively complete.

I have added a field (for customers tax id) and telephone numbers for the delivery and billing address.

There is magnificent field control for how you want to layout the products list columns in the rl_invoice3_def.php file. Just copy one of the formats and change it to suit, it magically gets the numbers right.

This is such a amazing piece of work that when I have finally figured it all out I intend to post it here with more explanations and a few minor error corrections as it deserves to be in wider use in the english-speaking world.
After having discovered the miracle of Google Translate I have been looking at the german forum and I think they all use this mod as standard from day one,

regards
Steve

2 Nov 2009, 10:11 PM
#12
gezaazy avatar

gezaazy

New Zenner

Join Date:
Oct 2009
Posts:
3
Plugin Contributions:
0

Re: pdf Invoice 3

torvista:

Hi GezaazY,
I cannot get the pdfs to be attached.

Can you confirm what settings you are using in the admin?

  1. Send by orderstatus greater/equal than:
    the default is 3|100 but I don't understand what the |100 refers to.
    I assume you have this set to just "1" with no bar?

  2. Send pdf invoice with order
    obviously "1".

Anything else to make it work?

thanks
Steve

  1. the orderstatus option does not have a bar. only thing I see that has the default option as "3|100" is the "[RE]send order"
    don't know exactly what that does :D

  2. that setting is correct

haven't done anything else to it as far as I can remember

thanks for the help on the layout file

5 Dec 2009, 9:09 AM
#13
moko avatar

moko

New Zenner

Join Date:
Nov 2009
Location:
Melbourne, AU
Posts:
1
Plugin Contributions:
0

Re: pdf Invoice 3

I've got this working and emailing but the filename of the invoice is always "Invoice.pdf", I thought it was meant to add the invoice number to the filename.
Has anyone got this feature working?
Cheers

20 Jan 2010, 2:36 AM
#14
shellbell avatar

shellbell

New Zenner

Join Date:
Aug 2009
Posts:
25
Plugin Contributions:
0

Re: pdf Invoice 3

Hi there!

I've just installed this mod however, I can't get the pdf-invoice button to turn up in the admin orders page. I use super orders so have merged the files with winmerge, adding the invoice3 stuff. But it's still not appearing.

Can anyone tell me what I've done wrong?

TIA

20 Jan 2010, 7:29 PM
#15
takoda avatar

takoda

New Zenner

Join Date:
Nov 2009
Location:
France
Posts:
26
Plugin Contributions:
0

Re: pdf Invoice 3

I'm not sure how many are using this mod - not many by the looks of things - but perhaps someone could help me.

The basically mod works fine, but the GBP pound sign - £ - appears on the pdf as a question mark. I've looked at https://www.zen-cart.at, but can't find an answer there... I've tried using another of the supplied fonts, with the same result.

Anyone with experience of this?

7 Oct 2010, 2:50 PM
#16
specopkirbs avatar

specopkirbs

New Zenner

Join Date:
Sep 2010
Posts:
6
Plugin Contributions:
0

Re: pdf Invoice 3

I wondered if anyone had managed to hack or edit the mod to show discounts at the minute i cant get it to show quantity discounts or the standard zen cart discounts.

Does anyone have any idea how this could be implimented?

21 Oct 2010, 9:59 AM
#17
garethrooney avatar

garethrooney

New Zenner

Join Date:
Apr 2009
Posts:
54
Plugin Contributions:
0

Re: pdf Invoice 3

Takoda

Did you ever find out how to get the £ sign working?

Regards

Gareth

25 Oct 2010, 11:42 AM
#18
garethrooney avatar

garethrooney

New Zenner

Join Date:
Apr 2009
Posts:
54
Plugin Contributions:
0

Re: pdf Invoice 3

Has anyone got the £ sign working on this mod?

Or even point me in the direction of where to lock it into the code as im not to bothered as i dont want it for multi currency.

Regards

Gareth

26 Oct 2010, 5:11 PM
#19
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

Re: pdf Invoice 3

Is this mod really 15Mb to download, rather than the quoted 887kb, or is the link wrong.

28 Oct 2010, 7:03 AM
#20
garethrooney avatar

garethrooney

New Zenner

Join Date:
Apr 2009
Posts:
54
Plugin Contributions:
0

Re: pdf Invoice 3

Probably is about 15mb due to having alot of raw code fonts in it and a few pdf's in need of a bit of optimisation.

The tricky bit other than the £ sign was getting the PDF invoice it generates down to a manageable amount my first attempt they were coming out at 784k each. Ive now got them down to 123k with a decent font the lowest i have got them is 46k but that was with a dreadful font.

Fixed the £ issue there is a zen cart mod that tells you how to convert your cart to UTF-8 follow the instructions from that. You need to edit both admin and non admin english.php's and put an extra line of code in another file to tell zen cart to read and write correctly to the mysql database.

The only downside to this is its strangely now broke the watermarks on my image handler 2 mod. Which i now need to go and do some homework on.

On a serious note now ive marstered this mod i seriously dont know why it has had only 3 downloads. Its up there with ceons mods. I was getting about 5-6 invoice requests per day through email even tho we send a printed copy with the goods.

Regards

Gareth