keanu Posted February 13, 2017 Share Posted February 13, 2017 Hey guys Some of the products in my shop doesn't have images and I expect that Prestashop 1.7 shows the default "no image available" image for the product automatically. But it doesn't. It worked perfectly in Prestashop 1.6. Info about my shop: I use Prestashop 1.7.04, I have 777 for "p" folder in images, both en.jpg and sv.jpg (for my swedish website) exist in "p" folder. All other images for the products which have images are shown without problem. What can be done? What can be the problem? I have searched about this but found nothing.... Link to comment Share on other sites More sharing options...
hesperson Posted February 15, 2017 Share Posted February 15, 2017 I have this problem too. Did you found a solution? Link to comment Share on other sites More sharing options...
keanu Posted February 25, 2017 Author Share Posted February 25, 2017 no.. no solution yet... hope prestashop can help Link to comment Share on other sites More sharing options...
helderv Posted March 7, 2017 Share Posted March 7, 2017 I'm on this too!Any soluction?Any prestahop Upgrade?I'm running 1.7.0.5 Link to comment Share on other sites More sharing options...
JacoboPS Posted March 16, 2017 Share Posted March 16, 2017 I'm also suffering the same trouble... any help/idea from the experts? Link to comment Share on other sites More sharing options...
jokerstar Posted May 3, 2017 Share Posted May 3, 2017 VS 1.7.1.1. have same problem, any solution? Link to comment Share on other sites More sharing options...
keanu Posted May 3, 2017 Author Share Posted May 3, 2017 No solution, and prestashop doesn't want to help. I simply ignored 1.7 and went back to 1.6... no prize in that for prestashop and its team 1 Link to comment Share on other sites More sharing options...
llukas Posted May 30, 2017 Share Posted May 30, 2017 Hello, I managed to solve this issue by changing the following code: For product list: open themes\classic\templates\catalog\_partials\miniatures\product.tpl and change: {block name='product_thumbnail'} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "{$product.cover.bySize.home_default.url}" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {/block} to {block name='product_thumbnail'} {if empty($product.cover.bySize.home_default.url)} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "link_to_your_image" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {else} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "{$product.cover.bySize.home_default.url}" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {/if} {/block} For product page: open themes\classic\templates\catalog\_partials\product-cover-thumbnails.tpl and change: {block name='product_cover'} <div class="product-cover"> <img class="js-qv-product-cover" src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> <div class="layer hidden-sm-down" data-toggle="modal" data-target="#product-modal"> <i class="material-icons zoom-in"></i> </div> </div> {/block} to {block name='product_cover'} {if empty($product.cover.bySize.large_default.url)} <div class="product-cover"> <img class="js-qv-product-cover" src="link_to_your_image" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> </div> {else} <div class="product-cover"> <img class="js-qv-product-cover" src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> <div class="layer hidden-sm-down" data-toggle="modal" data-target="#product-modal"> <i class="material-icons zoom-in"></i> </div> </div> {/if} {/block} Link to comment Share on other sites More sharing options...
keanu Posted September 18, 2017 Author Share Posted September 18, 2017 ABSOLUTELY NO reply or action from Prestashop on this issue, despite the fact that many user have the same problem/bug?! Is image issue not an important issue for ecommerce and Prestashop anymore? Please reply, Prestashop. Link to comment Share on other sites More sharing options...
jfcordova Posted December 21, 2018 Share Posted December 21, 2018 On 5/30/2017 at 4:25 AM, llukas said: Hello, I managed to solve this issue by changing the following code: For product list: open themes\classic\templates\catalog\_partials\miniatures\product.tpl and change: {block name='product_thumbnail'} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "{$product.cover.bySize.home_default.url}" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {/block} to {block name='product_thumbnail'} {if empty($product.cover.bySize.home_default.url)} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "link_to_your_image" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {else} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "{$product.cover.bySize.home_default.url}" alt = "{$product.cover.legend}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {/if} {/block} For product page: open themes\classic\templates\catalog\_partials\product-cover-thumbnails.tpl and change: {block name='product_cover'} <div class="product-cover"> <img class="js-qv-product-cover" src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> <div class="layer hidden-sm-down" data-toggle="modal" data-target="#product-modal"> <i class="material-icons zoom-in"></i> </div> </div> {/block} to {block name='product_cover'} {if empty($product.cover.bySize.large_default.url)} <div class="product-cover"> <img class="js-qv-product-cover" src="link_to_your_image" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> </div> {else} <div class="product-cover"> <img class="js-qv-product-cover" src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image"> <div class="layer hidden-sm-down" data-toggle="modal" data-target="#product-modal"> <i class="material-icons zoom-in"></i> </div> </div> {/if} {/block} This does work for prestathop 1.7. thanks Llukas 1 Link to comment Share on other sites More sharing options...
haunter Posted September 27, 2019 Share Posted September 27, 2019 (edited) I did some hotfix, will be resolving this in few weeks, I I'll remember, will put fix here. Hotfix for now - replace in .htaccess: Replace "localhost:8080" with your url. RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}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} ^localhost:8080$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^localhost:8080$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] Problem is, that in <img> is empty src - like "something/.jpg" If you like it, Like my post pls. Edited September 27, 2019 by haunter (see edit history) Link to comment Share on other sites More sharing options...
Vera Quadros Posted December 15, 2020 Share Posted December 15, 2020 Hi! In my htaccess file there are no configuration lines. I already disabled the friendly url, I deleted the htacces, then I enabled to recreate and, also it did not solve. Below my htaccess Domain: bellamagerrima.com.br RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/font-woff .woff AddType font/woff2 .woff2 <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> <FilesMatch "\.pdf$"> Header set Content-Disposition "Attachment" Header set X-Content-Type-Options "nosniff" </FilesMatch> </IfModule> <Files composer.lock> # Apache 2.2 <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> # Apache 2.4 <IfModule mod_authz_core.c> Require all denied </IfModule> </Files> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # php -- BEGIN cPanel-generated handler, do not edit # Defina o pacote “ea-php72” como a linguagem padrão de programação “PHP”. <IfModule mime_module> AddHandler application/x-httpd-ea-php72 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit 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