bonio89 Posted October 10, 2012 Share Posted October 10, 2012 Hello, I have problem with fresh install prestashop 1.5.1.0 - the invoice wont work. System back to me error messages: TCPDF ERROR: [image] Unable to get image: http://img/logo_invoice.jpg in url: http://shop.name.pl/index.php?controller=pdf-invoice&id_order=2 Please help, I was search problem on the forum but similar topics have no solution. Link to comment Share on other sites More sharing options...
RaDi_FR Posted October 11, 2012 Share Posted October 11, 2012 same problem here! Link to comment Share on other sites More sharing options...
bonio89 Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) I was fix it. My hosting (home.pl) have specifically server configuration. I insert into file: shopname\classes\pdf\HTMLTemplate.php in line 48 under line: $path_logo = $this->getLogo(); this script: //! START home.pl img dir $sname=substr($path_logo, 0, strlen($_SERVER['SERVER_NAME'])); //testing invoice logo dir is correct if($_SERVER['SERVER_NAME']!=$sname){ $path_logo = $_SERVER['SERVER_NAME'].$path_logo; } //END Please someone check this on working shop. HTMLTemplate.php Edited October 11, 2012 by bonio89 (see edit history) 5 Link to comment Share on other sites More sharing options...
RaDi_FR Posted October 11, 2012 Share Posted October 11, 2012 on my store, not working Link to comment Share on other sites More sharing options...
bonio89 Posted October 11, 2012 Author Share Posted October 11, 2012 on my store, not working show your error message Link to comment Share on other sites More sharing options...
RaDi_FR Posted October 11, 2012 Share Posted October 11, 2012 (edited) Warning: getimagesize(www.rtdetail.es/var/www/vhosts/rtdetail.es/httpdocs/img/logo_invoice.jpg): failed to open stream: No such file or directory in /var/www/vhosts/rtdetail.es/httpdocs/classes/pdf/HTMLTemplate.php on line 60 TCPDF ERROR: [image] Unable to get image: /var/www/vhosts/rtdetail.es/httpdocs/cache/tcpdf/img_BJVXP9 generated only if the delivery note, the screen remains blank, but if the change order status, and generate the invoice if you let me see the delivery note, but I want to just generate invoice delivery note without Edited October 11, 2012 by RaDi_FR (see edit history) Link to comment Share on other sites More sharing options...
bonio89 Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) write script which cut string /var/www/vhosts/rtdetail.es/httpdocs/ from $path_logo or set permament: $path_logo='http://rtdetail.es/img/logo_invoice.jpg Edited October 11, 2012 by bonio89 (see edit history) Link to comment Share on other sites More sharing options...
RaDi_FR Posted October 11, 2012 Share Posted October 11, 2012 (edited) anything, all the same I discovered that the problem is to create just the delivery note. if a state, I assign you create invoice and delivery note, packing slip is correct, but assume that the state is: preparing order - generate delivery note, does not work sent - generated invoice (anddelivery note) works some form of work to generate the delivery note? Edited October 11, 2012 by RaDi_FR (see edit history) Link to comment Share on other sites More sharing options...
bonio89 Posted October 11, 2012 Author Share Posted October 11, 2012 (edited) set variables in HTMLtemplate.php: $width = 240; //your invoice_logo width $height = 50; //your invoice_logo height under the code (probably 60 line): if (!empty($path_logo)) list($width, $height) = getimagesize($path_logo); or try to upload new logo for test in png and jpg format. check: http://www.prestashop.com/forums/topic/176064-tcpdf-error-help-plz/ Edited October 11, 2012 by bonio89 (see edit history) Link to comment Share on other sites More sharing options...
RaDi_FR Posted October 11, 2012 Share Posted October 11, 2012 but of you it works generate the delivery note without creating the invoice? Link to comment Share on other sites More sharing options...
PrestaShark Posted November 3, 2013 Share Posted November 3, 2013 bonio89! uratowałeś mi skórę tym tipem.. nigdy więcej sklepów na home.pljak oni konfigurują te hostingi!!!?? chyba aby klienci przechodzili wkurzeni na ich dedykowany soft chyba... dzięki! Link to comment Share on other sites More sharing options...
bonio89 Posted November 4, 2013 Author Share Posted November 4, 2013 bonio89! uratowałeś mi skórę tym tipem.. nigdy więcej sklepów na home.pl jak oni konfigurują te hostingi!!!?? chyba aby klienci przechodzili wkurzeni na ich dedykowany soft chyba... dzięki! No problem. Presta is working "propety" at home.pl to version 1.5.4. I don't have time for modify scripts for home.pl servers and i run now on my own phisical server at win 2008 r2 (datacenter) with iis. There is no problems but it don't have mod_rewrite from apache, and run litle slower(C2D E6600, 4gb ddr2 - i suppose Q6600 will be better for fast cgi). P.S. It is english forum and you should write in english;) Link to comment Share on other sites More sharing options...
_des_ Posted December 11, 2014 Share Posted December 11, 2014 bonio89 - you are genius! thank's a lot! Link to comment Share on other sites More sharing options...
kral2008 Posted March 11, 2015 Share Posted March 11, 2015 try to make a directory called "tcpdf" in cache folder and set its permission to 755. Then the error should gone. Link to comment Share on other sites More sharing options...
adasko12 Posted March 28, 2015 Share Posted March 28, 2015 (edited) hello, PS I have a problem with 1.6.0.14. Once you accept payment via Paypal I get an error in the form TCPDF ERROR: [image] Unable to get image: /img/tmp/product_mini_17_0.jpg. The same problem also appears to want to preview the invoice from the order history, even if the payment was made ordinary transfer. http://prntscr.com/6mbucu http://prntscr.com/6mbum0 Please help in this topic. I greet Edited March 28, 2015 by adasko12 (see edit history) Link to comment Share on other sites More sharing options...
cappucino2001 Posted March 29, 2015 Share Posted March 29, 2015 (edited) Hi, after all the changes I still have a problem (prestashop 1.6.0.9). My code: public function getHeader() { $shop_name = Configuration::get('PS_SHOP_NAME', null, null, (int)$this->order->id_shop); $path_logo='/img/centropol-1427632497.jpg'; //! START home.pl img dir $sname=substr($path_logo, 0, strlen($_SERVER['SERVER_NAME'])); //testing invoice logo dir is correct if($_SERVER['SERVER_NAME']!=$sname){ $path_logo = $_SERVER['SERVER_NAME'].$path_logo; } //END $width = 302; $height = 124; if (!empty($path_logo)) list($width, $height) = getimagesize($path_logo); $this->smarty->assign(array( 'logo_path' => $path_logo, 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), 'title' => $this->title, 'date' => $this->date, 'shop_name' => $shop_name, 'width_logo' => $width, 'height_logo' => $height )); return $this->smarty->fetch($this->getTemplate('header')); } System back to me error messages: Warning: getimagesize() [function.getimagesize]: Unable to find the wrapper "sklep.centropol.plhttp" - did you forget to enable it when you configured PHP? in /classes/pdf/HTMLTemplate.php on line 58Warning: getimagesize(sklep.centropol.plhttp://sklep.centropol.pl/img/centropol-1427632497.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /classes/pdf/HTMLTemplate.php on line 58TCPDF ERROR: [image] Unable to get image: sklep.centropol.plhttp://sklep.centropol.pl/img/centropol-1427632497.jpg Please help! Edited March 29, 2015 by cappucino2001 (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted March 29, 2015 Share Posted March 29, 2015 Your $path_logo variable is wrong: sklep.centropol.plhttp://sklep.centrop...-1427632497.jpg Link to comment Share on other sites More sharing options...
cappucino2001 Posted March 29, 2015 Share Posted March 29, 2015 Ok, so now is: Warning: getimagesize(sklep.centropol.pl/img/centropol-1427632497.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /classes/pdf/HTMLTemplate.php on line 57Warning: Cannot modify header information - headers already sent by (output started at /classes/order/Order.php:1) in /tools/tcpdf/tcpdf.php on line 8966TCPDF ERROR: Some data has already been output to browser, can't send PDF file 54 $width = 302; 55 $height = 124; 56 if (!empty($path_logo)) 57 list($width, $height) = getimagesize($path_logo); Link to comment Share on other sites More sharing options...
tuk66 Posted March 30, 2015 Share Posted March 30, 2015 Try getimagesize("http://sklep.centropol.pl/img/centropol-1427632497.jpg") or a file path, like /......./public_html/img/centropol-1427632497.jpg. Link to comment Share on other sites More sharing options...
cappucino2001 Posted March 30, 2015 Share Posted March 30, 2015 still doesn't work Link to comment Share on other sites More sharing options...
filipburman Posted April 2, 2015 Share Posted April 2, 2015 works with this fix.https://github.com/gRoussac/PrestaShop/commit/3ae695ad973d9e531105f35f895bbedc7d439c70 Link to comment Share on other sites More sharing options...
cappucino2001 Posted April 8, 2015 Share Posted April 8, 2015 Not exactly works... Fatal error: Class 'HTMLTemplate' not found in /classes/pdf/HTMLTemplateInvoice.php on line 31 Link to comment Share on other sites More sharing options...
selectshop.at Posted April 8, 2015 Share Posted April 8, 2015 If no script works, so disable the product pictures in invoice and that's it. Wait for next Prestashop release and upgrade. How to disable the pictures : Tab "preferences -> orders -> pdf settings -> Enable product image on Invoice/Enable product image on DELIVERY-SLIP = NO Link to comment Share on other sites More sharing options...
filipburman Posted April 8, 2015 Share Posted April 8, 2015 But it should work now, it works great for me. Gregory from Prestashop fixed it. http://forge.prestashop.com/browse/PSCSX-4925https://github.com/PrestaShop/PrestaShop/pull/2797/files 1 Link to comment Share on other sites More sharing options...
VectorLab Posted April 20, 2015 Share Posted April 20, 2015 But it should work now, it works great for me. Gregory from Prestashop fixed it. http://forge.prestashop.com/browse/PSCSX-4925 https://github.com/PrestaShop/PrestaShop/pull/2797/files Not working with me.... Link to comment Share on other sites More sharing options...
VectorLab Posted April 20, 2015 Share Posted April 20, 2015 But it should work now, it works great for me. Gregory from Prestashop fixed it. http://forge.prestashop.com/browse/PSCSX-4925 https://github.com/PrestaShop/PrestaShop/pull/2797/files Not working with me.... HTMLTemplate.php HTMLTemplateDeliverySlip.php HTMLTemplateInvoice.php 1 Link to comment Share on other sites More sharing options...
selectshop.at Posted April 20, 2015 Share Posted April 20, 2015 (edited) Unfortunately you did not mentioned your Prestashop Version. Initial topic is for PS 1.5.1.0 If no script works, so disable the product pictures in invoice and that's it. Wait for next Prestashop release and upgrade. How to disable the pictures : Tab "preferences -> orders -> pdf settings -> Enable product image on Invoice/Enable product image on DELIVERY-SLIP = NO I confirm, that Gregory's fix is working for PS 1.6.x. You should revise the adaptations you made. Edited April 20, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
OryginalDekeR Posted May 8, 2015 Share Posted May 8, 2015 I was fix it. My hosting (home.pl) have specifically server configuration. I insert into file: shopname\classes\pdf\HTMLTemplate.php in line 48 under line: $path_logo = $this->getLogo();this script: //! START home.pl img dir $sname=substr($path_logo, 0, strlen($_SERVER['SERVER_NAME'])); //testing invoice logo dir is correct if($_SERVER['SERVER_NAME']!=$sname){ $path_logo = $_SERVER['SERVER_NAME'].$path_logo; } //ENDPlease someone check this on working shop. This works for me on home.pl server with PrestaShop 1.6 1 Link to comment Share on other sites More sharing options...
abdullacm Posted June 20, 2015 Share Posted June 20, 2015 But it should work now, it works great for me. Gregory from Prestashop fixed it. http://forge.prestashop.com/browse/PSCSX-4925 https://github.com/PrestaShop/PrestaShop/pull/2797/files its working perfectly !! Link to comment Share on other sites More sharing options...
mohmmad mustafa Posted July 9, 2015 Share Posted July 9, 2015 But it should work now, it works great for me. Gregory from Prestashop fixed it. http://forge.prestashop.com/browse/PSCSX-4925 https://github.com/PrestaShop/PrestaShop/pull/2797/files its give me this error when print from frontoffice Notice: Undefined property: Order::$round_type in /home/--------------/public_html/classes/pdf/HTMLTemplateInvoice.php on line 190 Fatal error: Call to undefined method OrderInvoice::displayTaxBasesInProductTaxesBreakdown() in /home/-----------/public_html/classes/pdf/HTMLTemplateInvoice.php on line 241 when print from backoffice Fatal error: Call to undefined method OrderInvoice::displayTaxBasesInProductTaxesBreakdown() in /home/---------/public_html/classes/pdf/HTMLTemplateInvoice.php on line 241 im use ps1.6.0.14 Link to comment Share on other sites More sharing options...
Blawdi Posted December 23, 2015 Share Posted December 23, 2015 same error... Fatal error: Call to undefined method OrderInvoice::displayTaxBasesInProductTaxesBreakdown() in /home/-----------/public_html/classes/pdf/HTMLTemplateInvoice.php on line 241 Link to comment Share on other sites More sharing options...
tuk66 Posted December 23, 2015 Share Posted December 23, 2015 What is your version? Have you upgraded? Link to comment Share on other sites More sharing options...
Blawdi Posted December 23, 2015 Share Posted December 23, 2015 hello 1.6.0.14 yes upgrade to 1.5 For moment i have disable ligne 241. I no use tax Link to comment Share on other sites More sharing options...
tuk66 Posted December 27, 2015 Share Posted December 27, 2015 You should check if you have all files from 1.6.0.14 at your server. Link to comment Share on other sites More sharing options...
mentalspot Posted May 17, 2016 Share Posted May 17, 2016 I was fix it. My hosting (home.pl) have specifically server configuration. I insert into file: shopname\classes\pdf\HTMLTemplate.php in line 48 under line: $path_logo = $this->getLogo();this script: //! START home.pl img dir $sname=substr($path_logo, 0, strlen($_SERVER['SERVER_NAME'])); //testing invoice logo dir is correct if($_SERVER['SERVER_NAME']!=$sname){ $path_logo = $_SERVER['SERVER_NAME'].$path_logo; } //ENDPlease someone check this on working shop. works with 1.6.1.5 Link to comment Share on other sites More sharing options...
astrid2776 Posted August 9, 2016 Share Posted August 9, 2016 I have PrestaShop 1.6.1.4 and it doesn't work for me Link to comment Share on other sites More sharing options...
edy12001 Posted February 24, 2017 Share Posted February 24, 2017 Hi there, i have a problem at my presta shop. When someone make a purchase at our shop, when he finish is having an error like this. TCPDF ERROR: [image] Unable to get image: /img/tmp/product_mini_1149_3469.jpg Help me please to solve this. Link to comment Share on other sites More sharing options...
Recommended Posts