Jump to content

Edit History

ilario

ilario

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}

 

ilario

ilario

Ho quasi lo stesso problema di te, voglio anche mostrare nelle categorie della pagina - prodotti l'immagine A (e un altro nel passaggio del mouse)
Ho trovato il codice su come caricare le immagini, ma non so come modificare esso.
in teoria non dovresti usare $ product.cover, ma 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}

 

ilario

ilario

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 $

{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}

 

×
×
  • Create New...