balutten Posted April 29, 2013 Share Posted April 29, 2013 As the tittle says... some of the pictures arnt showing in the module after i have viewed them. like: http://www.balutten.dk/braetspil/angry-birds-knock-on-wood.html Anyone have a solution ? Link to comment Share on other sites More sharing options...
vekia Posted April 29, 2013 Share Posted April 29, 2013 hello i checked url that you pasted above, well i cant reproduce issue, for me pictures works fine Link to comment Share on other sites More sharing options...
balutten Posted April 29, 2013 Author Share Posted April 29, 2013 I know, the picture is fine, but not in the module ? Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi balutten, what do you mean? For me, all pictures are working fine. Link to comment Share on other sites More sharing options...
balutten Posted April 29, 2013 Author Share Posted April 29, 2013 but in the module "sete varer".. Try to go to the poduct i posted and then go to another product and then see that the linked product isnt shpwed with picture in the block ? Link to comment Share on other sites More sharing options...
balutten Posted April 29, 2013 Author Share Posted April 29, 2013 Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 I did see that it was calling from this url "http://www.balutten.dk/img/p/da-default-medium_default.jpg" do you have a folder like this on your host? Link to comment Share on other sites More sharing options...
balutten Posted April 29, 2013 Author Share Posted April 29, 2013 Yes i do have that folder Link to comment Share on other sites More sharing options...
tdr170 Posted April 29, 2013 Share Posted April 29, 2013 (edited) It is only the Angry birds image that does not seem to show, Try regenerating your product images if that does not work try deleting the images for that product and re-upload and see if that helps. The url link to the image is definitely wrong, have you tried to see if it works with friendly URL's off, I had an issue very similar with 1.5.4.0 and friendly urls causing images not to show. This is a little different then a problem I see with my 1.5.4.1 test site but may also fix this issue. http://forge.prestashop.com/browse/PSCFV-8973 Edited April 29, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 29, 2013 Share Posted April 29, 2013 Hi Tod, do you have the Git link I could point to? Thank you for the heads up. Yes i do have that folder Try tdr170's solution and let us know if it solves your problem. Thank you! Link to comment Share on other sites More sharing options...
tdr170 Posted April 29, 2013 Share Posted April 29, 2013 Well I was able to find it but I have not quit figured out the Github site. https://github.com/ShepherdV8/PrestaShop/commit/0832dee57f7a9de6af9d56f96b2d5d07aa00fcc7 Need to find a tutorial as I am not sure I did this 100% correct However looking at the Master file I see that the line has been changed. Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 is not only the angry birds there is some others too.. Now i have deleted the pictures and uploaded the pictures again didn't worked. i tryed this: http://forge.prestashop.com/browse/PSCFV-8973 Didnt worked Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 Now i deleted the module, where can i get it again, to reinstall it ? Link to comment Share on other sites More sharing options...
vekia Posted April 30, 2013 Share Posted April 30, 2013 Now i deleted the module, where can i get it again, to reinstall it ? if you deleted the module, you need to upload it, download prestashop installation library, unpack it, go to the modules dir and pack directory with this module. After that go to modules section in your BO and upload it -> install. unfortunately if you DELETED (not uninstall) the module - other way doesnt exist Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 Got it again, but dont work.. Guess i just have to uninstall it and leave it.. Link to comment Share on other sites More sharing options...
tdr170 Posted April 30, 2013 Share Posted April 30, 2013 Got it again, but dont work.. Guess i just have to uninstall it and leave it.. Did you try the fix I posted in the forge report, even though your issue is a little different the fix for viewed product images may work for your site to. Edit the blockviewed.php file and change as below: Changing line 108 from this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product)'. To this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Fixes the image issue. Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 Did you try the fix I posted in the forge report, even though your issue is a little different the fix for viewed product images may work for your site to. Edit the blockviewed.php file and change as below: Changing line 108 from this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product)'. To this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Fixes the image issue. Thx.. but the module is not even showing now so i dont know! Link to comment Share on other sites More sharing options...
tdr170 Posted April 30, 2013 Share Posted April 30, 2013 Thx.. but the module is not even showing now so i dont know! What does that mean, you uninstalled, re-install and try the fix posted if it does not work you can uninstall again. Nothing ventured nothing gained. lol Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 30, 2013 Share Posted April 30, 2013 I think he deleted it from FTP and has yet to reinstall it... vekia provided instructions in his post #14 Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 (edited) Okey... to make it clear. non of it works... i have the modul agian and it is on my store too, but still the same problem and when i change it to: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. The modul doesnt even show on my site Edited April 30, 2013 by balutten (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 30, 2013 Share Posted April 30, 2013 Okay, you installed the module again, and also made the changes that tdr170 mentioned? Cleared cache etc... still does not work? Link to comment Share on other sites More sharing options...
tdr170 Posted April 30, 2013 Share Posted April 30, 2013 Okey... to make it clear. non of it works... i have the modul agian and it is on my store too, but still the same problem and when i change it to: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. The modul doesnt even show on my site Very odd, well at least you tried. Link to comment Share on other sites More sharing options...
balutten Posted April 30, 2013 Author Share Posted April 30, 2013 Okay, you installed the module again, and also made the changes that tdr170 mentioned? Cleared cache etc... still does not work? Yes Very odd, well at least you tried. Yeah and thx a lot for the help! or the time you took Link to comment Share on other sites More sharing options...
Fabsh Posted May 1, 2013 Share Posted May 1, 2013 (edited) Hello guys , i have the same problem like balutten. I upgraded from 1.5.3.1 to the newest version . I tried the fix from tdr170 but now the modul isnt showing anymore. I really need a solution for this because i want to use the next version. Edited May 1, 2013 by Fabsh (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted May 1, 2013 Share Posted May 1, 2013 (edited) I tried multiple ways of changing the file and could not reproduce the module not showing at all. I know a lot of files have changed form 1.5.3.1 to 1.5.4.1 and not sure what is up here. I am wondering if your upgrade deleted all files from 1.5.3, in the past I had some issues with left over files from upgrades causing issues like this one. The site I am testing on is a fresh install of 1.5.4.1. I did some testing and there may be another line that needs to be added. Please try this and let me know what happens. replace this entire section in your blockviewed.php $productIds = implode(',', $productsViewed); $productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite FROM '._DB_PREFIX_.'product p '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image) LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') WHERE p.id_product IN ('.$productIds.') AND pl.id_lang = '.(int)($params['cookie']->id_lang).' AND cl.id_lang = '.(int)($params['cookie']->id_lang).' GROUP BY product_shop.id_product' ); Edited May 1, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
Fabsh Posted May 1, 2013 Share Posted May 1, 2013 I will test ist , can you tell me which lines i have to replace? Link to comment Share on other sites More sharing options...
tdr170 Posted May 1, 2013 Share Posted May 1, 2013 I will test ist , can you tell me which lines i have to replace? Should be lines 102-117 or very close to that its the only section with the code I posted. Link to comment Share on other sites More sharing options...
balutten Posted May 1, 2013 Author Share Posted May 1, 2013 I will test ist , can you tell me which lines i have to replace? Plz tell me if it works for you Link to comment Share on other sites More sharing options...
Fabsh Posted May 2, 2013 Share Posted May 2, 2013 Well it nearly worked. You see the picture now but the short description text is missing. Maybe we could fix this too ----- http://test.topsportsfood.eu/index.php I attached a screen and the changed blockviewed.php maybe i changed it wrong. blockviewed.php Link to comment Share on other sites More sharing options...
tdr170 Posted May 2, 2013 Share Posted May 2, 2013 (edited) Edited for content. Edited May 2, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
Fabsh Posted May 2, 2013 Share Posted May 2, 2013 Nope i didnt do anything. The text isnt visible when i look at it. I cleaned the cache and used chrome, firefox and the i-net explorer I see that the shop is in english when you visited it. What is strange because only german is activated. Did you tip at the header? Because it links to my original shop at topsportsfood.eu Prestashop 1.5.4.1 is at test.topsportsfood.eu Link to comment Share on other sites More sharing options...
tdr170 Posted May 2, 2013 Share Posted May 2, 2013 Nope i didnt do anything. The text isnt visible when i look at it. I cleaned the cache and used chrome, firefox and the i-net explorer I see that the shop is in english when you visited it. What is strange because only german is activated. Did you tip at the header? Because it links to my original shop at topsportsfood.eu Prestashop 1.5.4.1 is at test.topsportsfood.eu Yes now that you mention it I did just checked and you correct the Short desc does not show. If you change the file back do you get the short desc. but not the image. Link to comment Share on other sites More sharing options...
Fabsh Posted May 3, 2013 Share Posted May 3, 2013 Well i changed it back and now the Short Description is back but the image away . http://test.topsportsfood.eu Link to comment Share on other sites More sharing options...
Fabsh Posted May 6, 2013 Share Posted May 6, 2013 Hi tdr, any idea what we could try else? Link to comment Share on other sites More sharing options...
MadFlasher Posted May 6, 2013 Share Posted May 6, 2013 Did you try the fix I posted in the forge report, even though your issue is a little different the fix for viewed product images may work for your site to. Edit the blockviewed.php file and change as below: Changing line 108 from this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product)'. To this: LEFT JOIN '.DB_PREFIX.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Fixes the image issue. This fix instantly work for me THANKS ! Prestashop 1.5.4.1 fresh install on localhost with UniformServer No cache, all optimization deactivated Simply create 2 product with 2 (or more) pictures and go to the shop, after clicking on a product with 2 (or more) pictures the blockviewed push a blank image If only 1 img for the product : no bug Hope this help Link to comment Share on other sites More sharing options...
jaro61 Posted May 7, 2013 Share Posted May 7, 2013 (edited) Hi In Prestashop 1.5.4.1 this fix work for me. Changing line 108 from this: LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'. To this: LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Please, Try it. Edited May 7, 2013 by jaro61 (see edit history) Link to comment Share on other sites More sharing options...
Fabsh Posted May 8, 2013 Share Posted May 8, 2013 Thx, that worked. Link to comment Share on other sites More sharing options...
Teapot Creative Posted July 30, 2013 Share Posted July 30, 2013 Hi Goto GitHub and replace all your blockviewed.php file content with the content of the GitHub file, find it here: https://github.com/PrestaShop/PrestaShop/blob/development/modules/blockviewed/blockviewed.php Worked or me as replacing line 108 did not work. Nick Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 thanks for your suggestion i'm convinced that it will be helpfull for other forum members anyway, just want to say that on github you can usually find latest and fixed version of the prestashop, but also files in "progress" Link to comment Share on other sites More sharing options...
tdr170 Posted August 2, 2013 Share Posted August 2, 2013 Here is an update to this issue, I just did another upgrade test and this issue appeared again. When just replacing the single line the block would not even show just as with fabsh. So I took another look at the code and changed all lines to be as in the 1.5.4.0 working version and the images and text all show. line 108 is still changed but also Group was removed and an addition AND statement was added. As you can see below alot of the code is also re-arranged for order. Here is the complete code that worked for me should be lines 100 through around line 117. $productIds = implode(',', $productsViewed); $productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image) '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') WHERE p.id_product IN ('.$productIds.') AND (i.id_image IS NULL OR image_shop.id_shop='.(int)$this->context->shop->id.') AND pl.id_lang = '.(int)($params['cookie']->id_lang).' AND cl.id_lang = '.(int)($params['cookie']->id_lang) ); Link to comment Share on other sites More sharing options...
Recommended Posts