Show a swf file type as an alternative to products images.

Hello! and thanks.



What I want to do is add the ability to view a flash file with the same name as the main image, but extension “swf”, if the browser has flash installed.



Everything works except that I am not able to capture the names of image files and pass them to embed flash.



I have modified the file product_images.tpl, and I have been as follows:



{* $Id: product_images.tpl 9126 2010-03-19 14:26:16Z angel $ *}





{assign var="th_size" value="30"}
{include file="common_templates/previewer.tpl"}

{if $product.main_pair.icon}
{assign var="image_pair_var" value=$product.main_pair}
{elseif $product.option_image_pairs}
{assign var="image_pair_var" value=$product.option_image_pairs|reset}
{/if}

{include file="common_templates/image.tpl" obj_id=$product.product_id images=$image_pair_var object_type="product" class="cm-thumbnails"}

{foreach from=$product.image_pairs item="image_pair"}
{if $image_pair}
{include file="common_templates/image.tpl" images=$image_pair object_type="product" class="cm-thumbnails hidden" detailed_link_class="hidden" obj_id="`$product.product_id`_`$image_pair.image_id`"}
{/if}
{/foreach}

{if $image_pair_var && $product.image_pairs}
{if $settings.Appearance.thumbnails_gallery == "Y"}
{strip}

{/strip}

{script src="js/jquery.jcarousel.js"}

{else}

{/if}
{/if}





The problem appears I am not able to capture the path of the main image.

I tried "$ product.image_pairs | count" and the alert function returns "1", but I can not get anything else.

I have also tried: "$ product.image_pairs", "product_image", "$ image_pair_var ",..., but nothing has worked.

Now, I tried this:



And the result is:

"/cscart/images/no_image.gif" in the alert window.

Could someone help me?

Thank you very much and sorry for my English.