Jump to content
Kvothe

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More