Jump to content

Multiple product images on the product list?


Vojtěch

Recommended Posts

Hello,
I need to display more then one product image on the product list (product-list.tpl). Can somebody advise how to do that please? I tried to use piece of code I have found in product.tpl and product.php but it shows nothing. I think variable $images or $product is not initialized probably but I do not know how to fix it.

/* Found in product.php */
{$images = $product->getImages(intval($cookie->id_lang));}

/* Found in product-list.tpl */
{foreach from=$images item=image name=thumbnails}
{assign var=imageIds value=`$product->id`-`$image.id_image`}
getImageLink($product->link_rewrite, $imageIds, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" />
{/foreach}

Thank you in advance! Vojtech

Link to comment
Share on other sites

  • 2 weeks 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...