Jump to content

{IMG SRC} In ViewCat.tpl


Guest

Recommended Posts

:wacko: I am trying to resolve an issue that is giving me quite the headache....I managed to "fix" it and now the images are coming up broken again. I am trying to have the images on the viewcat.tpl to pull up the large uploaded files, and still retain the thumbnail images when needed.

Any help would be appreciated!!!

viewcat.inc

if(file_exists($GLOBALS['rootDir']."/images/uploads/".$productResults[$i]['image'])){

$view_cat->assign("IMG_SRC",$GLOBALS['rootRel']."images/uploads/".$productResults[$i]['image']);

} else {

$view_cat->assign("IMG_SRC",$GLOBALS['rootRel']."skins/".$config['skinDir']."/styleImages/nophoto.gif");

}

viewcat.tpl

<!-- BEGIN: products -->

<tr>

<td align="center" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self"><img src="{IMG_SRC}" alt="{TXT_TITLE}" border="0" title="{TXT_TITLE}" /></a></td>

<td valign="top" class="{CLASS}"><a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self" class="txtDefault"><strong>{TXT_TITLE}</strong></a><br />

{TXT_DESC}<div class="txtOutOfStock">{TXT_OUTOFSTOCK}</div></td>

<td align="center" valign="top" class="{CLASS}">{TXT_PRICE}

<div class="txtSale">{TXT_SALE_PRICE}</div></td>

<td width="80px" align="right" valign="top" class="{CLASS}">

<form action="{CURRENT_URL}" method="post" name="prod{PRODUCT_ID}">

<!-- BEGIN: buy_btn -->

<input type="hidden" name="add" value="{PRODUCT_ID}" />

<input type="hidden" name="quan" value="1" /><a href="javascript:submitDoc('prod{PRODUCT_ID}');" target="_self" class="txtButton">{BTN_BUY}</a><!-- END: buy_btn --> <a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self" class="txtButton">{BTN_MORE}</a></form></td>

</tr>

<!-- END: products -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...