Michel-T3 Posted November 19, 2018 Share Posted November 19, 2018 I Updated 2 shops to the latest version op Prestashop (1.7.4.4) and now our invoices don't have a logo. Tried re-uploading the logo file. That seem to be working. Old file is removed, new file is placed and renamed. The new name of the file is also updated in the database. Tried .jpg, .png and .gif... Still no logo on the invoices. All the uploaded files are converted to jpg, which i find strange. In the server error log I find a error: PHP Notice: Undefined property: PrestaShop\\PrestaShop\\Core\\Shop\\LogoUploader::$errors in /home/xxxxx/domains/xx.xx/public_html/src/Core/Shop/LogoUploader.php on line 120\n, referer: https://xxx.xxx/index.php?controller=AdminThemes&token=xxxx Tried changing the image tmp file, no luck... Has anyone else have the same problem? Anyone know a solution? PHP-versie: 7.1.23 Link to comment Share on other sites More sharing options...
stephanaust Posted December 3, 2018 Share Posted December 3, 2018 Yes I have the very same problem after an update to 1.7.4.4 😞 Logo is showing in shop and in emails but not on invoice. Tried using different logo files as well but no invoice logo. Posted this issue in the german forum but no response so far. 1 Link to comment Share on other sites More sharing options...
jancomer Posted December 15, 2018 Share Posted December 15, 2018 Me too, I also have the same issue... No solution found yet? Link to comment Share on other sites More sharing options...
Michel-T3 Posted December 16, 2018 Author Share Posted December 16, 2018 15 hours ago, jancomer said: Me too, I also have the same issue... No solution found yet? Still ro resolution, even no reaction from anyone from prestashop! Link to comment Share on other sites More sharing options...
Inform-All Posted January 17, 2019 Share Posted January 17, 2019 Hi, I came across the same problem as you guys. For some reason Prestashop didn't get a invoice url. Being (lazy) me here is a quick fix: Go to your FTP environment en go the file "pdf/header.tpl" And replace this: {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" /> {/if} With: <img src="your-logo-url" style="width:250px; height:100px;" /> I used the logo url from my shop, so if that is changed it automatically updated on the invoices to. 1 2 Link to comment Share on other sites More sharing options...
aepg70 Posted January 17, 2019 Share Posted January 17, 2019 (edited) Hi. I have the same problem. Not show the logo in Invoice. I have two shops ( multishops). I changed the script and now show the logo. thanks Edited January 18, 2019 by aepg70 (see edit history) Link to comment Share on other sites More sharing options...
Inform-All Posted January 20, 2019 Share Posted January 20, 2019 On 1/17/2019 at 6:00 PM, aepg70 said: Hi. I have the same problem. Not show the logo in Invoice. I have two shops ( multishops). I changed the script and now show the logo. thanks Did you clear cookies afterwards? Link to comment Share on other sites More sharing options...
tuk66 Posted February 5, 2019 Share Posted February 5, 2019 On 11/19/2018 at 6:02 PM, Michel-T3 said: I Updated 2 shops to the latest version op Prestashop (1.7.4.4) and now our invoices don't have a logo. Tried re-uploading the logo file. That seem to be working. Old file is removed, new file is placed and renamed. The new name of the file is also updated in the database. Tried .jpg, .png and .gif... Still no logo on the invoices. All the uploaded files are converted to jpg, which i find strange. In the server error log I find a error: PHP Notice: Undefined property: PrestaShop\\PrestaShop\\Core\\Shop\\LogoUploader::$errors in /home/xxxxx/domains/xx.xx/public_html/src/Core/Shop/LogoUploader.php on line 120\n, referer: https://xxx.xxx/index.php?controller=AdminThemes&token=xxxx Tried changing the image tmp file, no luck... Has anyone else have the same problem? Anyone know a solution? PHP-versie: 7.1.23 It is definitely a bug. You should disable Debug mode not to see PHP Notices. There is no $this->errors in that file so you can also remove it from the code. Link to comment Share on other sites More sharing options...
madpugger Posted February 7, 2019 Share Posted February 7, 2019 I am having this same issue. Additionally, product images are not showing on the invoice or delivery slips. Has anyone found the actual fix for this, rather than a fudge to make it work for now? Link to comment Share on other sites More sharing options...
aepg70 Posted February 7, 2019 Share Posted February 7, 2019 Hi. It's easy. Go to your FTP environment en go the file "pdf/header.tpl" And replace this: {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" /> {/if} With: <img src="your-logo-url" style="width:250px; height:100px;" /> I used the logo url from my shop, so if that is changed it automatically updated on the invoices to. in "your-logo-url" remplace "/img/logo_invoice.jpg" but remeber that logo_invoice should be a new logo with the same size. I hope you can change it. best regard Link to comment Share on other sites More sharing options...
madpugger Posted February 7, 2019 Share Posted February 7, 2019 17 minutes ago, aepg70 said: Hi. It's easy. Go to your FTP environment en go the file "pdf/header.tpl" And replace this: {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" /> {/if} With: <img src="your-logo-url" style="width:250px; height:100px;" /> I used the logo url from my shop, so if that is changed it automatically updated on the invoices to. in "your-logo-url" remplace "/img/logo_invoice.jpg" but remeber that logo_invoice should be a new logo with the same size. I hope you can change it. best regard Thanks, but this is not a fix. It is a workaround... Also, it is a workaround that is not working in my case. I still have no logo - and I also am missing product images. Any thoughts? 1 Link to comment Share on other sites More sharing options...
aepg70 Posted February 7, 2019 Share Posted February 7, 2019 yes it's not a fix but its a path. The solution will be when Prestashop update the new version. Link to comment Share on other sites More sharing options...
Michel-T3 Posted February 7, 2019 Author Share Posted February 7, 2019 The workaround works fine for the logo and will be overwritten if Prestashop updates the template file after they solved this bug. I activated the option "show images" on the invoice. And they also do not show up on the invoice from my shop. So I guess Prestashop has to work on an extra option. Link to comment Share on other sites More sharing options...
Jesus Posted February 19, 2019 Share Posted February 19, 2019 On 2/7/2019 at 11:44 AM, aepg70 said: Hi. It's easy. Go to your FTP environment en go the file "pdf/header.tpl" And replace this: {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" /> {/if} With: <img src="your-logo-url" style="width:250px; height:100px;" /> I used the logo url from my shop, so if that is changed it automatically updated on the invoices to. in "your-logo-url" remplace "/img/logo_invoice.jpg" but remeber that logo_invoice should be a new logo with the same size. I hope you can change it. best regard Thank you very much for your contribution! Link to comment Share on other sites More sharing options...
Web HvD Posted February 27, 2019 Share Posted February 27, 2019 On 2/7/2019 at 12:44 PM, Michel-T3 said: The workaround works fine for the logo and will be overwritten if Prestashop updates the template file after they solved this bug. I activated the option "show images" on the invoice. And they also do not show up on the invoice from my shop. So I guess Prestashop has to work on an extra option. is there already a solution for the image show on the invoice? Link to comment Share on other sites More sharing options...
Michel-T3 Posted February 28, 2019 Author Share Posted February 28, 2019 13 hours ago, Web HvD said: is there already a solution for the image show on the invoice? Just the workaround. This works fine. No reaction from prestashop regarding this bug. Link to comment Share on other sites More sharing options...
Prestased Posted March 12, 2019 Share Posted March 12, 2019 On 1/17/2019 at 1:52 PM, Inform-All said: Hi, I came across the same problem as you guys. For some reason Prestashop didn't get a invoice url. Being (lazy) me here is a quick fix: Go to your FTP environment en go the file "pdf/header.tpl" And replace this: {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" /> {/if} With: <img src="your-logo-url" style="width:250px; height:100px;" /> I used the logo url from my shop, so if that is changed it automatically updated on the invoices to. Thank you. It has worked well for me. Link to comment Share on other sites More sharing options...
Web HvD Posted March 12, 2019 Share Posted March 12, 2019 I still get no image of the product on my invoice. Does anyone have a solution for this? Link to comment Share on other sites More sharing options...
fjratelier Posted March 20, 2019 Share Posted March 20, 2019 Hi, Have the same problem here. Have the PS 1.7.5.0 version. I looked at the solution you have here. But what about the multishop? I have 6 shops with different domains and logos. How can I solve this here? Thanks. Link to comment Share on other sites More sharing options...
Web HvD Posted March 20, 2019 Share Posted March 20, 2019 The strange thing is that if I put the web store in a different folder, e.g. http://www.store.com/webshop I will see the product images on my invoice. Does anyone have an explanation for this? Link to comment Share on other sites More sharing options...
Inform-All Posted March 21, 2019 Share Posted March 21, 2019 17 hours ago, fjratelier said: Hi, Have the same problem here. Have the PS 1.7.5.0 version. I looked at the solution you have here. But what about the multishop? I have 6 shops with different domains and logos. How can I solve this here? Thanks. Yeah, this is a problem, the fix i provided does not keep track in which Multistore the order was placed. So you can use my fix, but this only allows 1 logo for all the multistores. Link to comment Share on other sites More sharing options...
Inform-All Posted March 21, 2019 Share Posted March 21, 2019 11 hours ago, Web HvD said: The strange thing is that if I put the web store in a different folder, e.g. http://www.store.com/webshop I will see the product images on my invoice. Does anyone have an explanation for this? Did you try my workaround? Could u share with us what u exactly did? (if needed, send me a private message) Link to comment Share on other sites More sharing options...
Web HvD Posted March 21, 2019 Share Posted March 21, 2019 12 hours ago, Inform-All said: Did you try my workaround? Could u share with us what u exactly did? (if needed, send me a private message) I have done nothing at all, just move the webshop to a different folder, and then I will see the image of the product on the invoice. So I now wonder what this is about. Link to comment Share on other sites More sharing options...
Inform-All Posted March 22, 2019 Share Posted March 22, 2019 13 hours ago, Web HvD said: I have done nothing at all, just move the webshop to a different folder, and then I will see the image of the product on the invoice. So I now wonder what this is about. Ehm, you mean you want to see the product images on the invoice? Maybe start a new post with your question, en be really specific what does not work anymore. Link to comment Share on other sites More sharing options...
orakel Posted March 22, 2019 Share Posted March 22, 2019 Hello, I had the same problem on 1.7.4.4, to solve this problem i overrided the getLogo function in HTMLTemplate.php and i replaced if (Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop))) { $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop); } elseif (Configuration::get('PS_LOGO', null, null, $id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop))) { $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop); } by if (Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop) != false && file_exists(_PS_IMG_DIR_ . Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop))) { $logo = __PS_BASE_URI__ . 'img/' . Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop); } elseif (Configuration::get('PS_LOGO', null, null, $id_shop) != false && file_exists(_PS_IMG_DIR_ . Configuration::get('PS_LOGO', null, null, $id_shop))) { $logo = __PS_BASE_URI__ . 'img/' . Configuration::get('PS_LOGO', null, null, $id_shop); } I didn't tested in multishop, but it works well for me now, Hope it will help Link to comment Share on other sites More sharing options...
Stefand Posted March 27, 2019 Share Posted March 27, 2019 Hi , this fix is working when you have also this issue with missing logo on the invoice in 1.7.5.1:https://github.com/PrestaShop/PrestaShop/commit/93db0c4a6afaaf138f417005ce93fb38d66659bf#diff-bba6e05abcc820c681135b7554fbafba Link to comment Share on other sites More sharing options...
fjratelier Posted March 27, 2019 Share Posted March 27, 2019 Hi Stefand, thanks, its works for me :) Prestashop 1.7.5.0 1 Link to comment Share on other sites More sharing options...
Sonia L Posted April 4, 2019 Share Posted April 4, 2019 En En 27/3/2019 a las 4:37 PM, Stefand dijo: Hola, esta solución está funcionando cuando también tiene este problema con el logotipo faltante en la factura en 1.7.5.1: https://github.com/PrestaShop/PrestaShop/commit/93db0c4a6afaaf138f417005ce93fb38d66659bf#diff-bba6e05abcc88201platin A mi me ha funcionado en la versión 1.7.5.1. Lo que no me aparecen son las imágenes de producto en el albarán, ni en la factura. A alguien le ha pasado lo mismo y lo ha podido solucionar. Gracias. Link to comment Share on other sites More sharing options...
apnow Posted May 1, 2019 Share Posted May 1, 2019 Hola, Despues de migrar la base de datos completa y el contenido mediante FTP al servidor de produccion, a mi tampoco me aparecen las imagenes en miniatura en facturas y albaranes. he comprobado que si se ven en el servidor de desarrollo. He probado a borrar la cache desde el BO pero sigue sin funcionar. La versión que estoy usando es la 1.7.5.0 Un saludo, Ibon Link to comment Share on other sites More sharing options...
Inform-All Posted May 1, 2019 Share Posted May 1, 2019 4 hours ago, apnow said: Hola, Despues de migrar la base de datos completa y el contenido mediante FTP al servidor de produccion, a mi tampoco me aparecen las imagenes en miniatura en facturas y albaranes. he comprobado que si se ven en el servidor de desarrollo. He probado a borrar la cache desde el BO pero sigue sin funcionar. La versión que estoy usando es la 1.7.5.0 Un saludo, Ibon Have you tried regenerating the images in the backoffice at "Design > Image Settings > Regenerate thumbnails" ? P.S. this part of the forum is English speaking only. Link to comment Share on other sites More sharing options...
apnow Posted May 1, 2019 Share Posted May 1, 2019 Hi Inform-All, Yes I did but nothing changed. I tried to debug a bit the issue but still stuck: I checked how the invoice was created in HTMLTemplateInvoice.php file. and log the vars in a file using FileLogger. so far, this is the html content created and sent to the tcpdf.php pdf generator: <img src="/usr/home/<<websitename>>/web/img/tmp/product_mini_44_0.jpg" alt="" class="imgm img-thumbnail" /> I checked that the file exists and even changed img/tmp/ folder permissions to 777 but no luck. Any hint' BR, Ibon Link to comment Share on other sites More sharing options...
Inform-All Posted May 1, 2019 Share Posted May 1, 2019 1 minute ago, apnow said: <img src="/usr/home/<<websitename>>/web/img/tmp/product_mini_44_0.jpg" alt="" class="imgm img-thumbnail" /> part where you have /usr/home/<<websitename>>/ should be a external domain (or ip address). For example http://yourdomain.com/web/img/tmp/product_mini_44_0.jpg Link to comment Share on other sites More sharing options...
apnow Posted May 2, 2019 Share Posted May 2, 2019 Hi, I think I found it a workaround: $order_detail['image_tag'] = preg_replace( '/\.*' . preg_quote(__PS_BASE_URI__, '/') . '/', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR, ImageManager::thumbnail($path, $name, 45, 'jpg', false), 1 ); Seems like this section in the function getContent() from the file HTMLTemplateInvoice.php constructs the image src path. For some reason: _PS_ROOT_DIR_ constant points to /usr/home/<<websitename>>/web. If I remove that constant then the image src point to the relative path: /img/tmp/... wich it works... Any hint? BR, Ibon Link to comment Share on other sites More sharing options...
ebonit Posted June 29, 2019 Share Posted June 29, 2019 there is a pull request on github that fixes the issue. it will be added in PS1.7.6 https://github.com/PrestaShop/PrestaShop/commit/93db0c4a6afaaf138f417005ce93fb38d66659bf#diff-bba6e05abcc820c681135b7554fbafba Link to comment Share on other sites More sharing options...
victorcarpicenter Posted July 1, 2019 Share Posted July 1, 2019 estoy en prestashop 1.7.5.2 y tengo el mismo problema que en la factura no me aparece el logo, alguien lo ha podido solucionar? Link to comment Share on other sites More sharing options...
Sonia L Posted July 2, 2019 Share Posted July 2, 2019 Buenos días Victor. Lo solucione haciendo estas modificaciones, te dejo el link: https://github.com/PrestaShop/PrestaShop/commit/93db0c4a6afaaf138f417005ce93fb38d66659bf#diff-bba6e05abcc820c681135b7554fbafba 1 Link to comment Share on other sites More sharing options...
madpugger Posted August 24, 2019 Share Posted August 24, 2019 Has the product image issue been fixed in 1.7.6? We now get the company logo OK on invoices, but still no product images? Thanks Link to comment Share on other sites More sharing options...
oncle Posted April 27, 2020 Share Posted April 27, 2020 Gracias Sonia, yo también he podido solucionar el problema del logo en las facturas. Link to comment Share on other sites More sharing options...
Sonia L Posted April 28, 2020 Share Posted April 28, 2020 hace 8 horas, oncle dijo: Gracias Sonia, yo también he podido solucionar el problema del logo en las facturas. Que bien, me alegro. Link to comment Share on other sites More sharing options...
Juliard Posted January 19, 2022 Share Posted January 19, 2022 this helped me: PS 1.7.6.5 Link to comment Share on other sites More sharing options...
Paulo Gois Posted June 17, 2022 Share Posted June 17, 2022 Change this line in "/classes\pdf\HTMLTemplate.php" (it's line 157 in my file) from: 'logo_path' => Tools::getShopProtocol() . Tools::getMediaServer(_PS_IMG_) . _PS_IMG_ . $logo, to: 'logo_path' => _PS_IMG_ . $logo, This should do the trick 1 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