hrothbeorht |
08-06-2007 11:08 AM |
product.tpl - help this poor fool
OK.. I admit it.
I've been the butcher. I've made some changes and now something is broken.
I really like the result of my changes, BUT!! one thing is broken that NEEDS to work!!
Ok, I've put some flash in where the product details image was. The thumbnail still worked when browsing products, but for some reason (my butchery) when viewing the cart contents.. the thumbnail won't show.
WhenI view the source, I see that it is trying to show the detailed product image.. (which is now flash)
Here is my code:
Code:
{* $Id: product.tpl,v 1.147.2.13 2007/04/23 07:06:22 max Exp $ *}
{include file="main/include_js.tpl" src="main/popup_image.js"}
{if $active_modules.Special_Offers}
{include file="modules/Special_Offers/customer/product_offers_short_list.tpl" product=$product}
{/if}
{include file="form_validation_js.tpl"}
{if $product.product_type eq "C" && $active_modules.Product_Configurator}
{include file="modules/Product_Configurator/pconf_customer_product.tpl"}
{else}
{capture name=dialog}
<form name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();">
<table width="100%">
<tr>
<td class="PImgBox" rowspan="2">
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{include file="modules/Detailed_Product_Images/popup_image.tpl"}
{elseif $product.force_image_type eq 'W' && $product.variantid}
{include file="product_thumbnail.tpl" productid=$product.variantid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"}
{else}
{*{include file="product_thumbnail_f.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail_f" type="P"}*}
{*---{$id}-{$tmbn_url}-{$http_location}-{$xcart_web_dir}-{$type|default:"T"}-{$productid}-{$image_x}-{$image_y}"{$product|escape}---*}
{if $store_language eq "FR"}
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','350','height','450','wmode','transparent','menu','false','src','http://www.website.ca/shop/images/P/F/','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.website.ca/shop/images/P/F/{$product.tmbn_url|filename}' ); //end AC code
</script><noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="335" height="427" id="movie" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.website.ca/shop/images/P/F/{$product.tmbn_url|filename}.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent">
<param name="bgcolor" value="#000000" />
<embed src="http://www.website.ca/shop/images/P/F/{$product.tmbn_url|filename}.swf" quality="high" menu="false" wmode="transparent" bgcolor="#000000" width="350" height="450" name="{$product.tmbn_url|filename}" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></noscript>
{else}
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','350','height','450','wmode','transparent','menu','false','src','http://www.website.ca/shop/images/P/','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.website.ca/shop/images/P/{$product.tmbn_url|filename}' ); //end AC code
</script><noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="335" height="427" id="movie" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.website.ca/shop/images/P/{$product.tmbn_url|filename}.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent">
<param name="bgcolor" value="#000000" />
<embed src="http://www.website.ca/shop/images/P/{$product.tmbn_url|filename}.swf" quality="high" menu="false" wmode="transparent" bgcolor="#000000" width="350" height="450" name="{$product.tmbn_url|filename}" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></noscript>
{/if}
{*
http://www.website.ca/shop/images/P/flash_img.swf{$product.tmbn_url}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}
*}
{/if}
{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}
{/if}
</object>
</td>
<td valign="top" width="100%">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><span>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</span></td>
{if $product.taxed_price gt 0 and $product.list_price gt 0}
<td align="right" valign="top" width="60" id="save_percent_box"{if $product.taxed_price >= $product.list_price} style="display: none;"{/if}>
<table width="60" cellspacing="1" cellpadding="2">
<tr>
<td class="SaveMoneyLabel">
<br />
{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount}
<span id="save_percent">{ $discount }</span>%
</td>
</tr>
</table>
</td>
{/if}
</tr>
</table>
<p />
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><b><font class="ProductDetailsTitle">{$lng.lbl_details}</font></b></td></tr>
<tr><td class="Line" height="1" colspan="2"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td width="30%">{$lng.lbl_sku}</td>
<td nowrap="nowrap" id="product_code">{$product.productcode}</td>
</tr>
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""}
<tr>
<td width="30%">{$lng.lbl_in_stock}</td>
<td nowrap="nowrap" id="product_avail_txt">
{if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$product.avail}{else}{$lng.lbl_no_items_available}{/if}
</td>
</tr>
{/if}
..clipped~!
|