Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing small image from product page


hi10key

Recommended Posts

Hi,

 

I was wondering if it is possible to remove the small image on the product detail page (the one that says 'Click to Enlarge'). I would prefer to just put a larger image right on the page immediately. I don't really see a point in having the small image repeated again when they already saw that on the previous subcategory page.

 

Any help would be greatly appreciated. Thank you.

Link to comment
Share on other sites

Sure!

 

In product_info.php, find the following code:

          <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">
<script language="javascript"><!--
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>'; ?>');
//--></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>

 

Play around with it a bit. You'll figure it out.

 

-jared

Link to comment
Share on other sites

ok - at least i was looking at the right part of the code to edit! thanks! i tried playing around with it a bit, but i couldn't get it to work. i'll try again. thanks for pointing me in the right direction.

Link to comment
Share on other sites

you simply have to replace

 

<td align="center" class="smallText">
<script language="javascript"><!--
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>'; ?>');
//--></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>

 

with

 

<td align="center"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], 'hspace="5" vspace="10"'); ?></td>

 

changing the values for hspace and vspace lets you customise the look.

 

BoF

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...