webwitch2003 Posted February 4, 2005 Posted February 4, 2005 Hello I would like to add the 'Click to Enlarge' function to my SUB categorie - i.e. My first categorie is Adults, then underneath that i have all the names of the bedding. When i click on the sub categorie i get the image in the corner. I would like to make this image clickable and open up in its own window. I am assuming that i would change this on the catalog/index.php page so that all the pictures will do that. This is the code from the catalog/index.php page where i think it should go - please correct me if i am wrong. <!-- body_text //--> <?php if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category Can someone tell me if this code will work to make the image enlarge - and where i should put it. document.write('<?php echo '<a href="javascript:popupWindow(\\\\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); Thanks a million - if anyone has done this and wants to just send over their file that would be great too! Angi :lol:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.