Jump to content

related product images not showing


Recommended Posts

i have install a module called CY-related product, which shows the related products under a tab of product description. The name on there shows exactly, but the picture of product are not showing. any kind hearted guy here have any solution ? :)

Link to comment
Share on other sites

<div id="idTabCY">

{if count($cyRelatedProducts) > 0}

{foreach from=$cyRelatedProducts item=cyRelatedProduct}

<div class="block" style="float: left;width: 120px;margin-right: 20px;">

{if $cyRelatedProduct.image.id_image ne ""}

<a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}"><img src="{$link->getImageLink($cyRelatedProduct.images.link_rewrite, $cyRelatedProduct.image.id_image, 'medium')}" height="80" width="80"></a>

{else}

<a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}"><img src="{$img_prod_dir}{$lang_iso}-default-medium.jpg" alt="" height="80" width="80" title="{$cyRelatedProduct.name|escape:'htmlall':'UTF-8'}" /></a>

{/if}

<br />

<a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}">{$cyRelatedProduct.name|htmlspecialchars} <img alt=">>" src="{$img_dir}bullet.gif" border=0/></a>

</div>

{/foreach}

{else}

<center><b>{l s='There are no related products at this time.' mod='cyrelatedproducts'}</b></center>

{/if}

</div>

 

i have posted the code of the tpl file, anyone have any idea ? pretty appreciate !

Link to comment
Share on other sites

i just change line 6: the code to get images from database to:

 

<img src="{$link->getImageLink($cyRelatedProduct.link_rewrite, $cyRelatedProduct.id_image, 'medium')}" alt="{$cyRelatedProduct.name|htmlspecialchars}" />

 

in the cyrelatedproducts.tpl,

 

and then i fix the problems that image not showing, feels happy now :-)

just post this if it helps the others .

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Mi solución ha sido esta:

 

 

<a href="{$cyRelatedProduct.link}" title="Ver {$cyRelatedProduct.name|htmlspecialchars}"><img src="{$link->getImageLink($cyRelatedProduct.image.link_rewrite, $cyRelatedProduct.image.id_image, 'medium_default')}" height="80" width="80"></a>

 

había un error en cyRelatedProduct.images.link_rewrite y lo he sustituido por cyRelatedProduct.image.link_rewrite por una "s" no funcionaba 

 

saludos

Link to comment
Share on other sites

×
×
  • Create New...