filipburman Posted March 19, 2015 Share Posted March 19, 2015 Hello,I hope someone can help me with this problem. I've found a few old threads about it but nothing that solves my problem.If I enable product images on invoice I get this error message on checkout. TCPDF ERROR: [image] Unable to get image: /img/tmp/product_mini_8_63.jpgAlso if I go into my orders and want to print the invoice I get the same error message.But if I'm in the admin panel it works perfect. I can generate a PDF with no errors. So it seems it's just for customers it doesn't work. Someone who have had the same problem? Or who might know a solution?I changed the permission on the picture to 644 and also tried 755 with no results.Thanks Link to comment Share on other sites More sharing options...
selectshop.at Posted March 19, 2015 Share Posted March 19, 2015 (edited) The location of img on your invoice is not correct. It is loading from a tmp folder cause when you uploaded it, the process didn't completed. Upload the logo for your invoices again on the tab "preferences -> themes -> logo mail and invoices and check. Correct folder for the invoice image is: /img/logo.jpg It is strange that your link is showing /product_mini_8_63.jpg. Did you changed something on core? Are you printing a thumb of the product in your invoices ? If yes, you should undo the adaptations you have done. Natively Prestashop is not showing thumbs of products on invoices. Edited March 19, 2015 by selectshop.at (see edit history) 1 Link to comment Share on other sites More sharing options...
filipburman Posted March 19, 2015 Author Share Posted March 19, 2015 Thanks for the reply selectshop.atI tried to upload the logo again with no success. I really need the thumb to be on the invoices, a key function for my business.And that's why I went for prestashop cause I saw that they had that option. I haven't installed any modules or changed anything in core.Showing thumbs in the invoice was a built in future when I installed prestashop. 1.6 . On Preferences > Orders I have an option called. (Enable product image on Invoice)Thanks. Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Your folder /img has enough writing permissions ? Check on FTP, at least CHMOD 0755 for folder and all sub-folders. Files should have CHMOD 0644. Link to comment Share on other sites More sharing options...
filipburman Posted March 20, 2015 Author Share Posted March 20, 2015 the img folder and all the subfolders have 755 and all the pictures has 644. And Still doesn't work. It seems so strange that I can do it in the admin. But not as a customer. Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 (edited) Do the following: Simply add your image in the size 350x81px through FTP to the folder /img as logo_invoice.jpg. This is the correct name and localization where the code is searching for the logo. If this also not solves than check the following: If you find on FTP /img another file with a name and -logo_invoice-123124906.jpg for ex. than delete this file and retry to upload the file from your back-office. Edited March 20, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
filipburman Posted March 20, 2015 Author Share Posted March 20, 2015 Hi again, thank you for the tip. I tried that and that didn't work either. Cause the logo doesn't seem to be a problem. If I disable product thumbnails on invoice everything works perfect. But I really need the option with the product thumbnails on invoice to work. But The strange part is that I haven't changed anything in core. Just a fresh installation of 1.6. Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Ah, you are using a non native version. Sorry I cannot help you, you must revert to the one from which you have the adaptation of product thumbnails. Link to comment Share on other sites More sharing options...
filipburman Posted March 20, 2015 Author Share Posted March 20, 2015 Sorry. I'm new to Prestashop. But what do you mean with native? My webhost provides a "one click installer" for different systems (prestashop, opencart, wordpress, jomla) and other things. I just installed the Prestashop they had there. PrestaShop version: 1.6.0.14 Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 Native = no changes on core. As you added own code for to have the thumbs on the invoice, this is not a native problem, but a problem of the change made. Therefore I cannot help you. Product thumbs on invoices is not a native feature, but one added by someone (bought/free non native theme, module, etc). Link to comment Share on other sites More sharing options...
filipburman Posted March 20, 2015 Author Share Posted March 20, 2015 But having thumbs on invoice is native. It is not a bought/free module. If you go to prestahops demo. And go to the backend you can see that it is built in.I took a printscreen were you can see the option. And this is Prestashops own demo. http://postimg.org/image/p4n7rvqmv/ The option is called Enable product image on invoice. Or am I missing something here. Link to comment Share on other sites More sharing options...
selectshop.at Posted March 20, 2015 Share Posted March 20, 2015 (edited) Which PS version ? I'm not using the latest for security reasons. I always wait some months and check if the version is working stable. Perhaps you found a bug. Latest really stable version for to use in production for me is 1.6.0.11. Please report it to the debug tracker in here: http://forge.prestashop.com Edited March 20, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
fmatey Posted March 25, 2015 Share Posted March 25, 2015 I have the same problem. In the administration area is generated correctly but the customer generates this error: CPDF ERROR: [Image] Unable to get image: /img/tmp/product_mini_36_0.jpg Link to comment Share on other sites More sharing options...
filipburman Posted March 26, 2015 Author Share Posted March 26, 2015 Apparently this is a bug in version 1.6.0.14. Hopefully someone will find a solution for it. Or at least that this will start working with 1.6.0.15. Link to comment Share on other sites More sharing options...
bellini13 Posted March 26, 2015 Share Posted March 26, 2015 if no one reports the issue to the Forge, then do not expect it to be resolved. however until it is resolved, then simply disable images in the PDF option in the back office Link to comment Share on other sites More sharing options...
filipburman Posted March 26, 2015 Author Share Posted March 26, 2015 It has been reported in the Forge. Link to comment Share on other sites More sharing options...
bellini13 Posted March 26, 2015 Share Posted March 26, 2015 and the forge report URL is? Link to comment Share on other sites More sharing options...
filipburman Posted March 26, 2015 Author Share Posted March 26, 2015 http://forge.prestashop.com/browse/PSCSX-4925 Link to comment Share on other sites More sharing options...
bellini13 Posted March 27, 2015 Share Posted March 27, 2015 good, now you have something to track the issue with. it was also reported in those comments that you can replace the PDF class with the one from PS 1.6.0.11 and it would work. I haven't tested that, but something you can try if you really want product images to appear in the invoice Link to comment Share on other sites More sharing options...
filipburman Posted March 27, 2015 Author Share Posted March 27, 2015 I tried to use the classes from .11. Then everything works, but no product image on the PDF. Link to comment Share on other sites More sharing options...
bellini13 Posted March 27, 2015 Share Posted March 27, 2015 oh well, then you may just have to wait for Prestashop developers to get off their butts and fix their issue. 1 Link to comment Share on other sites More sharing options...
pritishnandi Posted June 19, 2015 Share Posted June 19, 2015 (edited) I found a solution using the link: https://github.com/PrestaShop/PrestaShop/pull/2797/files Just check the highlighted code for each file to be modified, there are (-) for lines to be deleted and (+) for lines to be added or edited, I just copied the lines that need to be modified and pasted in the respected files in classes/pdf folder and everything is working right now. I am using the 1.16.0.14 installation. Edited June 19, 2015 by pritishnandi (see edit history) 1 Link to comment Share on other sites More sharing options...
David Eschmeyer Posted June 22, 2015 Share Posted June 22, 2015 this fix worked for me for download version, although the line numbers were not the same in the HTMLTemplateInvoice.php. Error still exists on cloud however and will cause any instant payment method to crash the checkout with the tcpdf error. To bypass the problem just uncheck to include image in invoice for now. It crashes in checkout because when the order converts, the payment accepted status tells the store to send the invoice attached to the payment accepted. This in turn throws the error as it generates the pdf to attach. Link to comment Share on other sites More sharing options...
danfar Posted June 24, 2015 Share Posted June 24, 2015 (edited) Im on 1.6.0.14 - I added the changes so im seeing the images for the new order invoices and but still alot of old ones show the error. My question is will it be ok for all new orders? also if I turn on / off Enable product image on Invoice my invoices still show images. thanks Edited June 24, 2015 by danfar (see edit history) Link to comment Share on other sites More sharing options...
jcuenin Posted March 8, 2016 Share Posted March 8, 2016 I found a solution using the link: https://github.com/PrestaShop/PrestaShop/pull/2797/files Just check the highlighted code for each file to be modified, there are (-) for lines to be deleted and (+) for lines to be added or edited, I just copied the lines that need to be modified and pasted in the respected files in classes/pdf folder and everything is working right now. I am using the 1.16.0.14 installation. Hello, I just wanted to say thank you for posting your solution, it helped me fixing an issue for a client. Best regards, Julien Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now