gozzapaul Posted May 19, 2013 Share Posted May 19, 2013 Hi There, I'm a prestashop newbie and would appreciate anyone's help. I have installed Egg Themes Pizza Deli theme but can not get the 'viewed products' on the left of the product page to display the thumbnails? I have tried various solutions advised in other posts such as removing _default form medium_default and regenerating thumbs etc but to no avail. The website is www.verucasalts.co.uk any help greatly appreciated. Link to comment Share on other sites More sharing options...
vekia Posted May 19, 2013 Share Posted May 19, 2013 the solution for your issue is probably here: http://www.prestashop.com/forums/topic/243696-solved-viewed-products-show-question-mark-ps-1541/page__p__1218306__hl__viewed%20products__fromsearch__1?do=findComment&comment=1218306 Make sure to confirm a working backup and try this in your blockviewed.php "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." 1 Link to comment Share on other sites More sharing options...
gozzapaul Posted May 19, 2013 Author Share Posted May 19, 2013 Completely solved...many thanks Vekia! Link to comment Share on other sites More sharing options...
vekia Posted May 19, 2013 Share Posted May 19, 2013 you're welcome i marked this thread as solved if you've got any other questions related to this case - feel free to continue discussion here regards Link to comment Share on other sites More sharing options...
leonidnk Posted May 22, 2013 Share Posted May 22, 2013 "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." Unfortunately, it is not so easy. I did it, and blockviewed dissapiered. However, when I substituted blockviewed 1.5.4.1 with 1.5.4.0, blockviewed came back and works as it should. Link to comment Share on other sites More sharing options...
vekia Posted May 22, 2013 Share Posted May 22, 2013 it disappeared probably because bug (parse error) in the code. Can you please paste here the code that you append? i will check it Link to comment Share on other sites More sharing options...
leonidnk Posted May 22, 2013 Share Posted May 22, 2013 the solution for your issue is probably here: http://www.prestasho..._1#entry1218306 Make sure to confirm a working backup and try this in your blockviewed.php "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." Unfortunately, it is not so easy. Not only one line of code. I did it, and blockviewed dissapiered. However, when I substituted blockviewed 1.5.4.1 with 1.5.4.0, blockviewed came back and works as it should. Link to comment Share on other sites More sharing options...
vekia Posted May 22, 2013 Share Posted May 22, 2013 hello i said in other threads that you have got parse error in the code probably. if it is possible - please show us your code Link to comment Share on other sites More sharing options...
flowDsign Posted May 28, 2013 Share Posted May 28, 2013 (edited) hello i said in other threads that you have got parse error in the code probably. if it is possible - please show us your code Hello, The problem with leonidnk's code may be as mine was: My old code: LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'. New code as per vekia sugested first: LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. So I had to keep the consistency with the "_"'. I hope this helpes. Edited May 28, 2013 by flowDsign (see edit history) Link to comment Share on other sites More sharing options...
Kat84 Posted May 30, 2013 Share Posted May 30, 2013 I'm having the same issue now. The viewed products block used to work fine but suddenly it started to not update anymore and now none of the thumbnails are showing anymore. I got it hooked on right column blocks, tried to de-install and re-install it, tried the customer visitor thingy as described in other threads and also tried to edit the code like said above, but none of it is working Does anyone have other suggestions? Link to comment Share on other sites More sharing options...
mfractal Posted June 6, 2013 Share Posted June 6, 2013 i can confirm the solution is working fine. cheers. BTW, i am a magento guy and a newbie to presta.. is it common to modify core files like that ? Just afraid next update it'll get overwritten and it;s kinda hard to keep track of all these small changes. Link to comment Share on other sites More sharing options...
vekia Posted June 6, 2013 Share Posted June 6, 2013 you can use override mechanism: http://doc.prestashop.com/display/PS15/Overriding+default+behaviors Link to comment Share on other sites More sharing options...
Andrew07 Posted August 4, 2013 Share Posted August 4, 2013 Thank you so much!)) Link to comment Share on other sites More sharing options...
tdr170 Posted August 4, 2013 Share Posted August 4, 2013 (edited) For any one reading this post having an issue with the blockviewed I have updated the blockviewed.php as with my latest test upgrade I also had the issue of the viewed block not showing after changing line 108 only. I found that there were other changes necessary for the block to work as expected. Here is the updated code, as you can see line 108 in changes as well as adding an AND at the bottom and removing GROUP, the code has been re-arranged. $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) ); Here is the updated blockviewed.php file. blockviewed.php ps: also reported to Forge: http://forge.prestashop.com/browse/PSCFV-10018 Edited August 4, 2013 by tdr170 (see edit history) 2 Link to comment Share on other sites More sharing options...
sparky123 Posted August 5, 2013 Share Posted August 5, 2013 Updated upload works. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 @tdr170 nice fix, you submited it to forge? Link to comment Share on other sites More sharing options...
tdr170 Posted August 5, 2013 Share Posted August 5, 2013 Yes posted on the forge, does this also effect fresh installs of 1.5.4.1. Link to comment Share on other sites More sharing options...
germs Posted August 26, 2013 Share Posted August 26, 2013 Hi tdr170. Thank you. It worked for me as well after I downloaded it and copied to the server. 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