No Phoca-PDF output when using hack "Legal Information text"

Phoca PDF - creating PDF documents in Joomla! CMS
phobophil
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Jan 2012, 18:13

No Phoca-PDF output when using hack "Legal Information text"

Post by phobophil »

Hey ho,

I have installed Phoca PDF Plugin on VirtueMart 1.1.9 stable and Joomla Version 1.5.25.

Everything was working fine. But after using a hack to allow HTML formatting in the "Legal Information Text", no receipt/invoice was created anymore. Instead I got an error message like this (excerpt):

Warning: Division by zero in /homepages/40/d238893567/htdocs/shop/plugins/phocapdf/virtuemart/virtuemartpdfoutput.php on line 193

Warning: Division by zero in /homepages/40/d238893567/htdocs/shop/plugins/phocapdf/virtuemart/virtuemartpdfoutput.php on line 205
%PDF-1.7 7 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20120104173604+01'00') /Resources 2 0 R /MediaBox [0.00 0.00 595.28 841.89] /CropBox [0.00 0.00 595.28 841.89] /BleedBox [0.00 0.00 595.28 841.89] /TrimBox [0.00 0.00 595.28 841.89] /ArtBox [0.00 0.00 595.28 841.89] /Contents 8 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 5 0 R 6 0 R ] /PZ 1 >> endobj 8 0 obj <> stream x��\Iw�6��W�a�S��9u'Vsh�m......


Changing HTML formatting ("Legal Information Text") in checkout process is explained here:

http://www.gjcwebdesign.com/allow-html- ... rvice.html

I think there is an relation between the plugin and the hack. Because, when I remove the Hack, PDF output is working correctly. I still want a readable text before confirming the checkout. So, both should run. Can you help me please?

Greetings
phobophil
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: No Phoca-PDF output when using hack "Legal Information t

Post by Jan »

Hi, for now I have no experiences with the hack, so no idea how it can influence the PDF creating :-( so on line 193 or 205 some protection against "division by zero" must be done or maybe check if the hack does not influence loading data (when they are empty they cannot be used in count functions)

Jan
If you find Phoca extensions useful, please support the project
phobophil
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Jan 2012, 18:13

Re: No Phoca-PDF output when using hack "Legal Information t

Post by phobophil »

Hi Jan,

Thanx for you reply. I do not really understand your comment. Now I repeated the procedure - deactivating/activating the hack of "legal information text". In debug mode I got the following message (short version):

500 - Es ist ein Fehler aufgetreten

JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT c.country_id FROM jos_vm_country AS c


I have no idea. Maybe now you can put two and two together?

How is your layout of the "legal information text" in the last step of checkout? My lawyer said that it should be well formatted and I think he is right. Without any HTML-Tags the whole text is chaotic, not readable and without link to the long version of "legal information text".

cu phobophil
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: No Phoca-PDF output when using hack "Legal Information t

Post by Jan »

Hi, you need to check all the sql query - seems there is some typo error :idea:
If you find Phoca extensions useful, please support the project
Post Reply