Forums / General Questions / Print Invoice from FrontEnd

Print Invoice from FrontEnd

Results 1 to 17 of 17
05 Aug 2007, 17:38
#1
imm avatar

imm

New Zenner

Join Date:
Aug 2007
Posts:
29
Plugin Contributions:
0

Print Invoice from FrontEnd

It's possible to print an invoice like in admin ?:huh:

Some botton that that opens a new clear windows for printing?

thanks
05 Aug 2007, 18:41
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: Print Invoice from FrontEnd

Not in core Zen Cart, but most of the work is done by the admin/invoice.php function so you could program your own catalog version based on this.
05 Aug 2007, 22:01
#3
imm avatar

imm

New Zenner

Join Date:
Aug 2007
Posts:
29
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

kuroi:

Not in core Zen Cart, but most of the work is done by the admin/invoice.php function so you could program your own catalog version based on this.


Is there any easy way? I ask this because I don't know how to program :blink:

Can some of you post some lines of code for me to add or substitute in some file?

Thanks :blush:
05 Aug 2007, 22:07
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: Print Invoice from FrontEnd

There's not an easy way and the only way to give you example code, would be to actually do the job for you, which would go way beyond what is appropriate for a support forum post.

I recommend posting a request in the commercial help wanted forum.
05 Aug 2007, 23:03
#5
imm avatar

imm

New Zenner

Join Date:
Aug 2007
Posts:
29
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Ok.

Thanks any way and sorry for the abuse :bigups:
06 Aug 2007, 07:55
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: Print Invoice from FrontEnd

No apology needed - it was a fair question - just with an answer a bit too big for a forum post. But keep asking the questions, they won't all be like this.
08 Aug 2007, 05:25
#7
redmonds avatar

redmonds

Zen Follower

Join Date:
Jan 2006
Posts:
108
Plugin Contributions:
1

Re: Print Invoice from FrontEnd

If you are looking to allow the customer to print their own invoice there is already a mod that will do this. It is for an older version of ZC but if you do a merge then it should work. I have had it working on 1.3.7.

It is called pop-up print invoice. I could not locate a version online but here is a copy that I have downloaded at some stage in the past.
08 Aug 2007, 11:10
#8
imm avatar

imm

New Zenner

Join Date:
Aug 2007
Posts:
29
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Thanks alot !!
08 Aug 2007, 12:28
#9
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Posts:
606
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

This was originally released by Blindside. If you search this old archived thread for "print invoice" you'll find the version for 1.3.7.

Brent
08 Aug 2007, 15:19
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Posts:
10,475
Plugin Contributions:
9

Re: Print Invoice from FrontEnd

This thread shows what gems are sometimes hidden away in the forum.

The 1.1 version posted by redmonds does appear to be the latest. I can't locate a version specifically for 1.3.7, but a quick check over the v1.1 code shows nothing obvious that would get inn the way of using that version with Zen Cart 1.3.7.1 or indeed any version from 1.3.0 onwards, though I haven't actually testing this.
11 Sep 2007, 18:03
#11
apemusic avatar

apemusic

Zen Follower

Join Date:
May 2006
Posts:
134
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Thanks Guys,

This is awesome and a big help :)

Now I just have to email this link to each customer. Any idea how I include this in the order confirmation email?
index.php?main_page=popup_print_invoice&order_id=1649

Also on the invoice it displays the column heading Tax and then “None!” is underneath it. I would like to remove both of these words, but have been fiddling around on includes/modules/print_invoice.php and can’t figure it. (I don't use the tax columns, if tax applies I insert it as a separate line).
Should be possible as I removed these tax column entries from my admin/invoice.php file. Any quick suggestions?

The other thing I wanted to do with these invoices is make sure the “Commonwealth Bank” image and Credit Card logo images did not appear (I only want them to appear at checkout, I just want the plain text on this invoice). Having HTML and image refs in these fields also causes difficulties when using the EDIT ORDERS module as the fields are then too long and get cut off. I was interested to see although in this includes/modules/print_invoice.php the words “Flat Rate Shipping” appear as just the text only without my large FedEx / UPS logos that are displayed on the checkout. Lines 167-171 may be onto something here, looks like is it clean formatting?

$format_shipping = explode(" (", $order->totals[$i]['title'], 2);
$clean_shipping = rtrim($format_shipping[0], ":");
$display_title = $clean_shipping . ':';

Pls can anyone help me remove that tax and none! text that is appearing and also make my payment method text appear without the logos??

Regards,
Dave
19 Nov 2007, 14:28
#12
ed0607 avatar

ed0607

New Zenner

Join Date:
Feb 2007
Posts:
12
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

redmonds:

If you are looking to allow the customer to print their own invoice there is already a mod that will do this. It is for an older version of ZC but if you do a merge then it should work. I have had it working on 1.3.7.

It is called pop-up print invoice. I could not locate a version online but here is a copy that I have downloaded at some stage in the past.


Thank you very much for this tool.
It works great:clap:

Any Idea how to add a button "Print here" instead of the link to print the invoice?

It might be a good idea to include this tool in the next ver.

Thank you all
Ed0607
[quote]
25 Nov 2007, 20:08
#13
ed0607 avatar

ed0607

New Zenner

Join Date:
Feb 2007
Posts:
12
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Hi All,

I have used the module. it works great..
Is there a chance to replace the text "print you order" with a nice button ?

Please let me know if you know how to :clap:
13 Dec 2007, 15:37
#14
poosk avatar

poosk

Totally Zenned

Join Date:
Mar 2005
Posts:
477
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

You can simply put the button's img tags instead of the [ print order invoice] text in the language file(s)..

This is excellent addon and should definitely be added to downloads if it's not there yet
12 Jan 2008, 04:23
#15
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Here are the modifications you have to make to add "print buttons" on the account and the order history pages...

in includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php

FIND

echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_VIEW_SMALL, BUTTON_VIEW_SMALL_ALT) . '</a>


ADD, AFTER

 <a href="' . zen_href_link('popup_print_invoice', 'order_id=' . $orders['orders_id'], 'SSL') . '" target="_blank"> ' . zen_image_button(BUTTON_IMAGE_PRINT_SMALL, BUTTON_PRINT_SMALL_ALT) . '</a>



in includes/templates/YOUR_TEMPLATE/templates/tpl_account_history_default.php

FIND

<?php echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_VIEW_SMALL, BUTTON_VIEW_SMALL_ALT) . '</a>


ADD, AFTER

 <a href="' . zen_href_link('popup_print_invoice', 'order_id=' . $history['orders_id'], 'SSL') . '" target="_blank"> ' . zen_image_button(BUTTON_IMAGE_PRINT_SMALL, BUTTON_PRINT_SMALL_ALT) . '</a>



in includes/languages/english/button_names.php

FIND

  define('BUTTON_IMAGE_VIEW_SMALL', 'button_view.gif');


ADD, AFTER

  define('BUTTON_IMAGE_PRINT_SMALL', 'button_print.gif');



Finally, add the two images 'button_view.gif' & 'button_print.gif' attached to this message to the includes/templates/YOUR_TEMPLATE/buttons/english folder.

Please note that the button_view.gif has been resized a little - it is slightly bigger now. Now are basic icons, if you make better ones, please post them here

Hope this helps,


sanji
03 Apr 2008, 20:16
#16
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

I've tried to install the mod and it works great except that on the screen, it doesn't show the [Print Order Invoice] but instead shows the text associated with it, please see attached screen shot.

Any idea where I went wrong? :blink:
12 Jan 2011, 09:18
#17
novastar avatar

novastar

Zen Follower

Join Date:
Jul 2009
Posts:
127
Plugin Contributions:
0

Re: Print Invoice from FrontEnd

Old thread, still hope someone replies. good mod but the option to print my invoice isn't showing up on the account_history_default page. pointers?