raneman Posted August 21, 2006 Share Posted August 21, 2006 I am trying to get rid of the popup window and "click to enlarge" in product info. page. However, I still want to display a large image of the product in the product info. page. Any idea? thx a lot. Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted August 21, 2006 Share Posted August 21, 2006 I'm using something like this in my live store entry: find <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="java script: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>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> use instead (specify your own image size, I have 300 for width/height): <?php if (tep_not_null($product_info['products_image'])) { ?> <tr> <td align="center" class="smallText"><?php echo tep_image(DIR_WS_IMAGES . 'big/' . $product_info['products_image'], $product_info['products_name'], '300', '300'); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <p><?php echo stripslashes($product_info['products_description']); ?></p> :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
raneman Posted August 21, 2006 Author Share Posted August 21, 2006 I'm using something like this in my live store entry: Hi Monika; Thanks a million for your input. I applied code and it worked. Just a side-note in case someone else is using this code, You need to create a directory named " big " in your shop images directory and dump all your big photos there. As Monika mentioned it you could specify the size of your photos. And that is it. Monika, thank you very much Link to comment Share on other sites More sharing options...
oldshoe Posted May 24, 2007 Share Posted May 24, 2007 quote name='Monika in Germany' date='Aug 21 2006, 10:41 AM' post='920425'I'm using something like this in my live store entry: Hi all, I'm trying to have multiple images and a zoomed area, so if you clicked in any image, its relative zoomed version would be displayed in the zoomed area. I've started creating new fields in the 'products' table to hold additional image paths and that is fine. Then (I'm using STS), in the sts_inc/product_info.php I've defined new variables that would hold the small pictures: $template_pinfo['image01'] = tep_image(DIR_WS_IMAGES . $product_info['products_image01'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); $template_pinfo['image02'] = tep_image(DIR_WS_IMAGES . $product_info['products_image02'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); And the zoomed area would receive image01 as a default: $template_pinfo['imagezoom'] = $template_pinfo['image01']; Now, how do I redefine variables 'image01' and 'image02' so they become hyperlinks and if you click them they change the image displayed by 'imagezoom' ? Please help. Thanks, Old Shoe Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.