Forums / Templates, Stylesheets, Page Layout / Taking away Larger image option

Taking away Larger image option

Locked

Views: 1,269

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
6 Jun 2006, 1:18 AM
#1
v_kirk avatar

v_kirk

Zen Follower

Join Date:
Jun 2006
Posts:
110
Plugin Contributions:
0

Taking away Larger image option

in the product description page, how would i take off the link that brings up a larger image of an item (under the item picture)?

6 Jun 2006, 4:43 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Taking away Larger image option

The link is added in /includes/templates/template_default/templates/ tpl_modules_main_product_image.php. The part of the file that does the work is:

<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript">//<!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
<noscript>
<?php
  echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</noscript>
</div>
  • If you have not already done so, set up your own template directory and copy the file into it before editing anything!! Check the FAQs for info on custom templates. *

Delete large parts of this to leave only:

 
<div id="productMainImage" class="centeredContent back">

<?php 
  echo zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) ;
?>

</div>

Normally I would suggest to comment out the unwanted parts in case you decide later that you want them after all; but in this case with PHP, HTML and Javascript so intertwined that becomes a nightmare.

I do highly recommend that you save a copy (tpl_modules_main_product_image-original.php) for reference. The -original will keep it from being noticed by Zen Cart.