Invoice-to-PDF Mailer [support thread]
:yes:
as the name suggests, it generates a pdf from your invoice, then allows you to mail it as an attachment.
Download: http://www.uhost.com.au/downloads/in...mailer_v01.zip
--------------------------------------------------
contact me via the forum or www.hthring.com,
regards,
Hayden Thring
Australia.
09/11/08
Re: Invoice to PDF Mailer [support thread]
Zencart attaches file just fine. In fact, I wrote a module that uses the pdf invoice center, to send email to customers everytime a new order is placed (with the pdf invoice attached)
Re: Invoice to PDF Mailer [support thread]
Quote:
Originally Posted by
yellow1912
Zencart attaches file just fine. In fact, I wrote a module that uses the pdf invoice center, to send email to customers everytime a new order is placed (with the pdf invoice attached)
it might just, but i couldnt work it out, and there was comments in the code that it was buggy and unfinished.
so where this module of urs ??
Re: Invoice to PDF Mailer [support thread]
Quote:
Originally Posted by
hayden
it might just, but i couldnt work it out, and there was comments in the code that it was buggy and unfinished.
so where this module of urs ??
It was written for a customer and will not be released without his consent :)
Re: Invoice to PDF Mailer [support thread]
so i take it u were able to to send attachments via the normal mail system ?? any tips ??
Hayden.
Re: Invoice to PDF Mailer [support thread]
Hi, i have istalled this mod also, edited the super_orders.php to make te email button vizible but when in press it i get a new page saying:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
Also i got this error log from the error_debug_log:
[10-Nov-2008 03:24:53] PHP Fatal error: Uncaught exception 'PDFlibException' with message 'Bad floating point number for PDF' in /home/your/path_to/website/admin/dompdf/include/pdflib_adapter.cls.php:680
Stack trace:
#0 /home/your/path_to/website/admin/dompdf/include/pdflib_adapter.cls.php(680): PDFlib->fit_textline('Moto Bike Shop', 6, 768.72, 'rotate=0 wordsp...')
#1 /home/your/path_to/website/admin/dompdf/include/text_renderer.cls.php(84): PDFLib_Adapter->text(6, 6, 'Moto Bike Shop', '/home/motobike/...', 16, Array, 0)
#2 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(180): Text_Renderer->render(Object(Text_Frame_Decorator))
#3 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(96): Renderer->_render_frame('text', Object(Text_Frame_Decorator))
#4 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Text_Frame_Decorator))
#5 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Cell_Frame_Decorator))
#6 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Row_Frame_Decorator))
#7 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Frame_Decorator))
#8 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Cell_Frame_Decorator))
#9 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Row_Frame_Decorator))
#10 /home/your/path_to/website/admin/dompdf/include/renderer.cls.php(132): Renderer->render(Object(Table_Frame_Decorator))
#11 /home/your/path_to/website/admin/dompdf/include/page_frame_reflower.cls.php(82): Renderer->render(Object(Block_Frame_Decorator))
#12 /home/your/path_to/website/admin/dompdf/include/frame_decorator.cls.php(387): Page_Frame_Reflower->reflow()
#13 /home/your/path_to/website/admin/dompdf/include/dompdf.cls.php(417): Frame_Decorator->reflow()
#14 /home/your/path_to/website/admin/makepdf.php(15): DOMPDF->render()
#15 /home/your/path_to/website/admin/pdfmail.php(18): include('/home/motobike/...')
#16 {main}
thrown in /home/your/path_to/website/admin/dompdf/include/pdflib_adapter.cls.php on line 680
Enyone experienced something like this?
I did not manage to make it work.
I have folowed the instuctions from /admin/dompdf/install.txt
and also from admin/read.install.txt
and also made directoryes writebel
/admin/invoices/
/admin/dompdf/lib/fonts
I am using 1.3.8a version of Zen Cart.
Best regards Zoli.
Re: Invoice to PDF Mailer [support thread]
This is part of the observer class I used, this is all it takes to attach the (created) file to the email confirmation of the order:
PHP Code:
function update(&$class, $eventID, $paramArray) {
global $order;
$file = $this->createOrderPdf($paramArray['zf_insert_id']);
$order->attachArray = $file;
}
Note: this is for 1.3.8, not tested on any previous version
$file is path to file btw.
Re: Invoice to PDF Mailer [support thread]
maybe there is something up with ur invoice.php ?? try using a default one if you've customised ur current one at all, see if u can get it warking atleast like that
Re: Invoice to PDF Mailer [support thread]
I get 2 errors when using this addon:
1. Where is FILENAME_ORDER_EDIT defined? I cannot find it anywhere.
2. When I click 'Email PDF' button, received this error: Parse error: syntax error, unexpected T_NEW in /home/username/public_html/admin/dompdf/include/functions.inc.php on line 240
Re: Invoice to PDF Mailer [support thread]
Quote:
Originally Posted by
battra
I get 2 errors when using this addon:
1. Where is FILENAME_ORDER_EDIT defined? I cannot find it anywhere.
2. When I click 'Email PDF' button, received this error: Parse error: syntax error, unexpected T_NEW in /home/username/public_html/admin/dompdf/include/functions.inc.php on line 240
ok , im sorry , i had editable orders addon installed first ...
"
NAME:
=====
Edit Orders
VERSION:
========
1.53 - 8/1/2008 - 1.5, 1.51, 1.52, and 1.53 Changes by Scott Turner
"
if u dont have this installed it should just be this:
if (sizeof($order->products) > 0) {
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
}
break;
}
########
you want it to look like this:
########
if (sizeof($order->products) > 0) {
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="pdfmail.php?oID=' . $oInfo->orders_id . '&email=' . $order->customer['email_address'] . '">' . zen_image_button('button_pdf.gif', 'Email PDF') . '</a>'');
}
break;
}
---------
try that instead