sheikyerbouti Posted October 21, 2002 Share Posted October 21, 2002 I was directed to catalog/product_info.php to make changes to the code to remove the "Click to Enlarge" link (also clicking on the photo to enlarge it). However, the php/html combination below confuses a newbie like me. Can anyone highlight the text below that i need to remove to get rid of the "Click to Enlarge" option? This text was taken from about line 102-104. Thanks in advance, pete <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_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['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_values['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> Link to comment Share on other sites More sharing options...
yoja Posted October 21, 2002 Share Posted October 21, 2002 Eh, i think you've got to remove the complete javascript poup code <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); and change the othe code to: <?php echo 'tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'; ?> i think good luck Link to comment Share on other sites More sharing options...
♥olby Posted October 21, 2002 Share Posted October 21, 2002 Without testing it, this should be the code to replace your posting if you want an image at all. If not, just delete all of the code you posted. <tr> <td align="center"> <?php echo tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?> </td> </tr> Be sure to have a BACKUP before trying. Best Regards olby Link to comment Share on other sites More sharing options...
sheikyerbouti Posted October 21, 2002 Author Share Posted October 21, 2002 nope this is the error i get when i make it look like that. I think it's correct to remove the javascript part, but the second section of code is missing something or misplaced something. See errror: Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /catalog/product_info.php on line 99 Link to comment Share on other sites More sharing options...
sheikyerbouti Posted October 21, 2002 Author Share Posted October 21, 2002 Olby- I made it like you said, but now there's no image on the page at all. Can i make it so that the page loads an image on the product info page but it just doesn't contain a link to launch a new window?? Thanks Link to comment Share on other sites More sharing options...
sheikyerbouti Posted October 21, 2002 Author Share Posted October 21, 2002 forget it!!! i got it on my own thru trial and error. If you want to load the picture, but not have it be a link, you need to keep the javascript so it writes the picture, but take out the anchor info like so: <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?>'); //--></script> <noscript> <?php echo tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?> </noscript> </td> </tr> Link to comment Share on other sites More sharing options...
rip Posted June 10, 2003 Share Posted June 10, 2003 I tried all the code ideas on this page. My need is to keep the image, but remove the "click to enlarge" (and remove the ability to do so by clicking on the image). But to no avail. Is the bottom code missing something? When I tried that, the little missing image x came up on the page and when I look at the properties, it shows the path, but not the file name of the image... ...maybe someone could let me know how to change the code to include the filename in the page code. Thanks Link to comment Share on other sites More sharing options...
tcpinhead Posted June 10, 2003 Share Posted June 10, 2003 I have done what I think you are in need of. I disabled the click to enlarge if there isn't another image there. The thread is http://www.oscommerce.com/forums/viewtopic.php?t=41355 Good luck Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.