mux Posted December 28, 2012 Share Posted December 28, 2012 Hi I am using PS 1.5.1.7 upgraded from PS 1.4.8. Now i used one module to fetch most selling products of a category. The problem is it is missing product image or you can say Image URL is not right. It is missing something. Once some images appeared and then lost again. Can anyone in community suggest what could be the problem? http://purmoservice.fi/presta/en/35-tubeflies You can see here. Thanks Link to comment Share on other sites More sharing options...
razaro Posted December 28, 2012 Share Posted December 28, 2012 That module probably needs some code change so it could be 1.5 compatible. See this code from default blockbestsellers module and compare it to tpl file of module you are using. <a href="{$product.link}" title="{$product.legend|escape:'htmlall':'UTF-8'}" class="content_img clearfix"> <span class="number">{$smarty.foreach.myLoop.iteration}</span> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small_default')}" height="{$smallSize.height}" width="{$smallSize.width}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /> </a> One change is that in 1.5 images have _default in name so try with small_default. Also links are wrong but I am not sure if you can just replace in a tag href="{$product.link}" as that depends from php code. Link to comment Share on other sites More sharing options...
mux Posted December 28, 2012 Author Share Posted December 28, 2012 Hi Razaro... This code either didn't work, as you can see. Can it be some other problem? below is the code in htaccess file. Can it be creating some issue??? # Images RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^purmoservice.fi$ RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L] Thanks Link to comment Share on other sites More sharing options...
razaro Posted December 28, 2012 Share Posted December 28, 2012 Did you enabled force compile and turned off cache after changing that code ? .htaccess shouldn't cause issues but if you upgraded recently, did you regenerate images after ? Link to comment Share on other sites More sharing options...
mux Posted December 28, 2012 Author Share Posted December 28, 2012 Force compile is enabled and cache is On. I once regenrated thumbnails of products only. Link to comment Share on other sites More sharing options...
mux Posted December 28, 2012 Author Share Posted December 28, 2012 One other thing. Images are displaying on other places it is just missing it in current module. Yesterday i regrenrated images of products only, before image regenration i was able to see images of some products in this module and today all images are missing... Link to comment Share on other sites More sharing options...
razaro Posted December 28, 2012 Share Posted December 28, 2012 Check in Preferences > Images and what is setting of Use the legacy image filesystem Because in .htaccess file code you posted is for new file system. You can check ..img/p/330-239-small.jpg exists and hat is old file system and htaccess seeks img/p/2/3/9/239-small.jpg. So you can check that and use old/legacy image filesystem or transfer images and use new one. Link to comment Share on other sites More sharing options...
mux Posted December 28, 2012 Author Share Posted December 28, 2012 (edited) in BackOffice settings for is Use the legacy image filesystem YES. If i set it to NO then all product images are vanished. Edited December 28, 2012 by mux (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts