Page 1 of 2

errors with phoca pdf and virtuemart

Posted: 11 Nov 2010, 17:49
by Gecker
Hello,

i have some problems using phoca pdf with virtuemart and need some help.

i have joomla 1.5 and virtuemart 1.1.5. and php5

after i set in order details a new delivery i can see the pdf icons for invoice and so on but if i try to open them i get followering error.
Firefox 3.6 Error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/3/d347013505/htdocs/plugins/phocapdf/virtuemart.php on line 20

IE8 Error:
Fatal error: Call to a member function on a non-object in /homepages/3/d347013505/htdocs/administrator/components/com_phocapdf/helpers/phocapdfrender.php on line 136
I installed all like this https://www.phoca.cz/documents/18-virtue ... eipt-addon

1. com_phocapdf_v1.0.9.zip
2. plg_phocapdf_virtuemart_v1.0.0.zip
3. com_phocainstall_vm.zip

4. cahnged order.order_print.php
$tab->endTab();
$tab->endPane();
to
$tab->endTab();
// Delivery $lang =& JFactory::getLanguage();
$lang->load('plg_phocapdf_virtuemart', JPATH_ADMINISTRATOR, null, true);
$tab->startTab( JText::_('PLG_PHOCAPDF_VM_DELIVERY_TAB_LBL'), "delivery_pane" );
require_once(CLASSPATH.'ps_order_delivery.php'); $tab->endTab();
// End Delivery $tab->endPane();
have i forgot something to install or to change?
does anybody know how to solve this problem?

thanks

gecker

Re: errors with phoca pdf and virtuemart

Posted: 13 Nov 2010, 19:12
by Jan
Hi, this is wrong:

Code: Select all

$tab->endTab();
// Delivery $lang =& JFactory::getLanguage();
$lang->load('plg_phocapdf_virtuemart', JPATH_ADMINISTRATOR, null, true);
$tab->startTab( JText::_('PLG_PHOCAPDF_VM_DELIVERY_TAB_LBL'), "delivery_pane" );
require_once(CLASSPATH.'ps_order_delivery.php'); $tab->endTab();
// End Delivery $tab->endPane();
It is fixed now, the code function removed the <br> tags, it should be:

Code: Select all

$tab->endTab();
// Delivery
$lang =& JFactory::getLanguage();
$lang->load('plg_phocapdf_virtuemart', JPATH_ADMINISTRATOR, null, true);
$tab->startTab( JText::_('PLG_PHOCAPDF_VM_DELIVERY_TAB_LBL'), "delivery_pane" );
require_once(CLASSPATH.'ps_order_delivery.php'); $tab->endTab();
// End 
Delivery $tab->endPane();
I am testing the plugin without getting any parse error, try to download all the extensions again and reinstall. :idea:

Jan

Re: errors with phoca pdf and virtuemart

Posted: 15 Nov 2010, 11:41
by Gecker
mh now i got still the same error

Code: Select all

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/3/d347013505/htdocs/plugins/phocapdf/virtuemart.php on line 20

Re: errors with phoca pdf and virtuemart

Posted: 15 Nov 2010, 13:57
by superx11
I got the same problem. This is what I get when push the pdf-icon

Warning: Division by zero in /customers/webpage.com/webpage.com/httpd.www/Webpage/administrator/components
/com_phocapdf/assets/tcpdf/tcpdf.php on line 11403

I do not understand why it isnot working with the invoice system. I have spend a lot of time on this.

Re: errors with phoca pdf and virtuemart

Posted: 16 Nov 2010, 21:54
by Jan
Hi,
I got the same problem
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/3/d347013505/htdocs/plugins/phocapdf/virtuemart.php on line 20
is not the same problem like this:
Warning: Division by zero in /customers/webpage.com/webpage.com/httpd.www/Webpage/administrator/components
/com_phocapdf/assets/tcpdf/tcpdf.php on line 11403
Mostly this can happen, if the TCPDF is not able to translate the html code (it is not valid, it is complicated, etc, :idea: )

Re: errors with phoca pdf and virtuemart

Posted: 17 Nov 2010, 17:08
by superx11
Jan wrote:Hi,
I got the same problem
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/3/d347013505/htdocs/plugins/phocapdf/virtuemart.php on line 20
is not the same problem like this:
Warning: Division by zero in /customers/webpage.com/webpage.com/httpd.www/Webpage/administrator/components
/com_phocapdf/assets/tcpdf/tcpdf.php on line 11403
Mostly this can happen, if the TCPDF is not able to translate the html code (it is not valid, it is complicated, etc, :idea: )

Thanx bro, I have managed to solve that problem! :D

Re: errors with phoca pdf and virtuemart

Posted: 19 Nov 2010, 08:35
by Lasn
Hi superx11,

How did you solve the problem? Structured you some messy code?

I am very tired about finding a solution :idea:

Re: errors with phoca pdf and virtuemart

Posted: 19 Nov 2010, 18:02
by superx11
Lasn wrote:Hi superx11,

How did you solve the problem? Structured you some messy code?

I am very tired about finding a solution :idea:

My problem was not a problem really, just bad instructions.

I solved it like this:

Log in to Joomla; chose Extensions; Plug in manager; go to Phoca PDF VM; enable it; VOILA!

Hope this could help you.

I have problems with invoice it self now. I have it english, which is good, but I need it in swedish also. Nothing works and I am sick and tired of these problems.

Re: errors with phoca pdf and virtuemart

Posted: 29 Nov 2010, 22:48
by Lasn
I know you don't care about hosting- and safe mode restrics, but can you give me some advice to fix that ?
Fatal error: Uncaught exception 'ImagickException' with message 'Safe mode restricts user to read image: /tmp/mska_vn2zEp' in
/data/www/public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php:7613 Stack trace: #0 /data/www/public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php(7613): Imagick->writeimage('/tmp/mska_vn2zE...') #1 /data/www/public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php(7157): TCPDF->ImagePngAlpha('/data/www/', 15, 22.709444444444, 211, 76, 74.436111111111, 26.811111111111, 'PNG', '', 'B', false, 300, '') #2 /data/www/public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php(20342): TCPDF->Image('/data/www/e/ega...', 15, 22.709444444444, 0, 0, '', '', 'B', false, 300, '', false, false, 0, false, false, true) #3 /data/www//public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php(19775 in /data/www/public_html/subdomeny/eshop/administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php on line 7613

Re: errors with phoca pdf and virtuemart

Posted: 01 Dec 2010, 19:34
by Jan
Hi, seems like your hosting does not allow to use functions which e.g. tcpdf needs to use. :(

Jan