Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing "Click to Enlarge"


sheikyerbouti

Recommended Posts

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

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

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

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

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

  • 7 months later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...