Jump to content

Problem with product images


Recommended Posts

Hi guys. I´m working on this page www.blancossampedro.com/store/ in prestashop 1.7.6.1.

This is my problem. I have selected an image (image A) which is a generic product image as default product image, then as my product are tablecloths..  i created different product combination based en color, so i have 1 product, which are napkins, in different color combination.  I have a picture for each color (let´s call them image B, image C , Image D), so when the customer clicks on a color the store shows him the product in that specific color, and those are configured in combinations.

my problem is. i have to select 1 combination to be te default product combination, but its image (image B, image C or Image D)  overrides my first generic product image (image A). so that in my category view a product details appears...and i don't want that.

 

Any suggestion?

 

Sorry for my english btw

Untitled-2.jpg

Link to comment
Share on other sites

I have almost the same problem as you, I also want to show on the page categories - products the image A (and another in the hover)
I found the code of how to load the images, but I don't know how to modify it.
in theory you should not use $ product.cover, but image $

<div class="thumbnail product-thumbnail relative flex-container">

      {block name='product_thumbnail'}
      <a href="{$product.url}" class="relative{foreach from=$product.images item=image}{if ($image.cover != 1)} subimage-true{break}{/if}{/foreach}">
        {if $product.cover}
          {include file='catalog/_partials/product-image.tpl' image=$product.cover type=$type}
          {if Configuration::get('pm_hover_image') == true}
            {foreach from=$product.images item=image}
              {if ($image.cover != 1)}
                {include file='catalog/_partials/product-image.tpl' image=$image type=$type}
                {break}
              {/if}
            {/foreach}
          {/if}
        {else}
          <img src="{$urls.no_picture_image.bySize.large_default.url}" style="width:100%;">
        {/if}
      </a>
      {/block}

 

Edited by ilario (see edit history)
Link to comment
Share on other sites

  • 1 year later...

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...