Related Products with file preview

Hi Guys,



Im doing a small modification to load related products to a block using products2.tpl but to add the related products attached preview file but having a few problems getting it to work.



Any ideas?



[highlight]file: /public_html/skins/basic/customer/blocks/products2.tpl[/highlight]

```php

{* $Id: products2.tpl 7321 2009-04-20 13:20:33Z angel $ }

{
* block-description:products2 **}

{assign var=“columns” value=$settings.Appearance.columns_in_products_list|default:“3”}

{if $columns > $items|count}

{assign var=“columns” value=$items|count}

{/if}

{split data=$items size=$columns assign=“splitted_objects”}

{math equation=“floor(100/x)” x=$settings.Appearance.columns_in_products_list|default:“3” assign=“cell_width”}



{if $block.properties.item_number == “Y”}

{assign var=“cur_number” value=1}

{/if}


{foreach from=$splitted_objects item="sobjs" name="splitted_objects"}


{foreach from=$sobjs item="product" name="sobjs"}
{assign var="obj_id" value="`$block.block_id`000`$product.product_id`"}
{if $product.product}
{include file="views/products/components/product_files.tpl" product=$product obj_id=$obj_id assign="file_info"}
{include file="views/products/components/buy_now.tpl" but_role="act" but_rev="product_form_`$obj_id`" box_class="products-rounded" hide_wishlist_button=true hide_compare_list_button=true product=$product obj_id=$obj_id simple=true capture_price=true assign="buttons" hide_add_to_cart_button=$block.properties.hide_add_to_cart_button additional_link=$additional_link}


{/if}
{/foreach}

{foreach from=$sobjs item="product" name="sobjs"}


{/foreach}



{/foreach}
{if $block.properties.item_number == "Y"}{$cur_number}. {math equation="num + 1" num=$cur_number assign="cur_number"}{/if}{$product.product|unescape} {$smarty.capture.price} {$buttons} {$file_info}

```

[highlight]file: /public_html/skins/basic/customer/views/products/components/products_files.tpl[/highlight]
```php
{* $Id: product_files.tpl 7419 2009-05-05 11:40:34Z lexa $ *}

{foreach from=$files item="file"}
preview
{/foreach}

```

All the other information i can get displayed apart from the preview link any ideas anyone?