Jump to content

Remove product cover from product page Presta 1.7


Recommended Posts

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

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

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

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

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

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

  • 1 month later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...