go4play Posted November 6, 2018 Share Posted November 6, 2018 Hello every one I need some help to know how can I remove the product image cover from the product page only, I manage to make the first screenshot to be the image to show, but the cover is still on the thumbnail so I want to completely remove it from there, but keep it on the product list as default. Thank you all Link to comment Share on other sites More sharing options...
go4play Posted November 6, 2018 Author Share Posted November 6, 2018 Any help please Link to comment Share on other sites More sharing options...
Rolige Posted November 7, 2018 Share Posted November 7, 2018 Hello: I don't know if I understand well what are you looking for, but if you want to remove cover image on product page you must skip it from images list that is loaded in ProductController before set it to product template. Regards Link to comment Share on other sites More sharing options...
go4play Posted November 7, 2018 Author Share Posted November 7, 2018 Hello Can you please tell me how to do that, what I need is basically, have the product cover on the product list but on product page the default Image will be a screenshot, that I could fix and its working, now I only want to remove the product cover from the product page and thumbnail Thank you Link to comment Share on other sites More sharing options...
go4play Posted November 7, 2018 Author Share Posted November 7, 2018 Some help guys, I'm kinda despred Thank you all Link to comment Share on other sites More sharing options...
go4play Posted November 8, 2018 Author Share Posted November 8, 2018 bump Link to comment Share on other sites More sharing options...
go4play Posted November 8, 2018 Author Share Posted November 8, 2018 guess no one will help where can I request for this help does anyone knows a better forum to ask this? Link to comment Share on other sites More sharing options...
endriu107 Posted November 8, 2018 Share Posted November 8, 2018 You need to edit file templates/catalog/_partial/product-cover-thumbnails.tpl First block is for big image and second block is for thumbnails. Link to comment Share on other sites More sharing options...
go4play Posted November 8, 2018 Author Share Posted November 8, 2018 45 minutes ago, endriu107 said: You need to edit file templates/catalog/_partial/product-cover-thumbnails.tpl First block is for big image and second block is for thumbnails. Hello Thank you for the answer, I know its somewhere there but I don't know what to do to remove the cover and let only the screenshots Link to comment Share on other sites More sharing options...
endriu107 Posted November 9, 2018 Share Posted November 9, 2018 You need to only check if image is cover or not and remove it, in thumbnails block there is already sample of this statment like {if $image.id_image == $product.cover.id_image} you can use it in foreach loop. Link to comment Share on other sites More sharing options...
go4play Posted November 9, 2018 Author Share Posted November 9, 2018 Ok but still I don't know what to do! Link to comment Share on other sites More sharing options...
endriu107 Posted November 9, 2018 Share Posted November 9, 2018 You wrote this topic in PrestaShop Developers > Addons, modules and themes developers forum section, so I assume you are developer and you have at least basic knowledge about php and smarty right? If you want to hide product cover image from thumbnails change second block to this: {block name='product_images'} <div class="js-qv-mask mask"> <ul class="product-images js-qv-product-images"> {foreach from=$product.images item=image} {if $product.cover.bySize.home_default.url != $image.bySize.home_default.url} <li class="thumb-container"> <img class="thumb js-thumb " data-image-medium-src="{$image.bySize.medium_default.url}" data-image-large-src="{$image.bySize.large_default.url}" src="{$image.bySize.home_default.url}" alt="{$image.legend}" title="{$image.legend}" width="100" itemprop="image" > </li> {/if} {/foreach} </ul> </div> {/block} Link to comment Share on other sites More sharing options...
go4play Posted November 9, 2018 Author Share Posted November 9, 2018 Hi there sorry I guess then I placed it in the wrong section, ill just upload the tpl file because its a bit different from the Original, and if you can please tell me what to replace with and big thnx for your great help. product-cover-thumbnails.tpl Link to comment Share on other sites More sharing options...
endriu107 Posted November 13, 2018 Share Posted November 13, 2018 Change this part: {foreach from=$product.images item=image} <li class="thumb-container {if $thumbCount >= $sliderFor}item{else}product_item col-xs-12 col-sm-6 col-md-4 col-lg-3{/if}"> <img class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}" data-image-medium-src="{$image.bySize.medium_default.url}" data-image-large-src="{$image.bySize.large_default.url|replace:'-large_default':''}" src="{$image.bySize.home_default.url}" alt="{$image.legend}" title="{$image.legend}" width="100" itemprop="image" > </li> {/foreach} To this: {foreach from=$product.images item=image} {if $product.cover.bySize.home_default.url != $image.bySize.home_default.url} <li class="thumb-container {if $thumbCount >= $sliderFor}item{else}product_item col-xs-12 col-sm-6 col-md-4 col-lg-3{/if}"> <img class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}" data-image-medium-src="{$image.bySize.medium_default.url}" data-image-large-src="{$image.bySize.large_default.url|replace:'-large_default':''}" src="{$image.bySize.home_default.url}" alt="{$image.legend}" title="{$image.legend}" width="100" itemprop="image" > </li> {/if} {/foreach} Link to comment Share on other sites More sharing options...
Miss Etta Posted December 16, 2018 Share Posted December 16, 2018 On 11/13/2018 at 11:40 AM, endriu107 said: To this: {foreach from=$product.images item=image} {if $product.cover.bySize.home_default.url != $image.bySize.home_default.url} <li class="thumb-container {if $thumbCount >= $sliderFor}item{else}product_item col-xs-12 col-sm-6 col-md-4 col-lg-3{/if}"> <img class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}" data-image-medium-src="{$image.bySize.medium_default.url}" data-image-large-src="{$image.bySize.large_default.url|replace:'-large_default':''}" src="{$image.bySize.home_default.url}" alt="{$image.legend}" title="{$image.legend}" width="100" itemprop="image" > </li> {/if} {/foreach} Hello, I used your solution for a hover effect on the homepage and list page. But the second image can be seen briefly and then it shows the third image. How to avoid this?? Thank you! 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