Zen Cart Logo
Forums / Basic Configuration / How can I remove the 'Larger Image' Link?

How can I remove the 'Larger Image' Link?

Views: 7,650

Results 1 to 17 of 17
4 Apr 2007, 3:59 AM
#1
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

How can I remove the 'Larger Image' Link?

I have little need for the larger image link, partly because the images are all small at the moment, and partly because when I have fixed the images they will be as big as is needed in the product page.

Is there a switch that I can't find? Or will I have to find the code?

thanks
:)

4 Apr 2007, 10:51 PM
#3
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Thanks :)

unfortunately thats 3 years old and that file doesn't exist anymore!! LOL

but I have a function to look for now

Thanks

5 Apr 2007, 2:54 AM
#4
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Ok

I found that the function is now called from : \includes\templates\template_default\templates\tpl_modules_main_product_image.php

Which I have edited as below, this removed the textual link, but I can not figure out how to drop the link/script from the displayed image; whenever I try I lose the image also :(

<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
 */
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> 
<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 /></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 /></a>';
?>
</noscript>

</div>
5 Apr 2007, 3:30 AM
#5
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

sorted, not elegant.. but its done:

<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
 */
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> 
<div id="productMainImage" class="centeredContent back">

<script language="javascript" type="text/javascript"><!--
document.write('<?php echo ' ' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /></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 /></a>';
?>
</noscript>
-->

</div>
5 Apr 2007, 10:49 AM
#6
purplemoon avatar

purplemoon

New Zenner

Join Date:
Apr 2007
Posts:
5
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

That is the file that I altered:

includes/templates/template_default/templates/tpl_modules_main_product_image.php
and then I removed the TEXT_CLICK_TO_ENLARGE and link is now gone from beneath the picture

7 Apr 2007, 11:58 PM
#7
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Hi :)

Yeh that was the first bit, but I didn't want the image clickable either, which the second part solved for me :)

9 Apr 2007, 5:05 PM
#8
garyclemens avatar

garyclemens

New Zenner

Join Date:
Jan 2007
Location:
Florida/Missouri
Posts:
77
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

I too am looking for information on this. I have seen nothing recently posted within the last couple of years. This is what im trying to do.

When I add a new product I am using a large image in the "Product Description". I do want to use the small image under the catagory listing with the other products. I do not want the thumbnail or link to larger image on the actual individual product page.

Any help would be great!

Example: http://securitybycamera.com/index.php?main_page=product_info&cPath=15_18&products_id=35

10 Apr 2007, 12:19 AM
#9
ghostcorps avatar

ghostcorps

Zen Follower

Join Date:
Aug 2004
Posts:
398
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

garyclemens:

When I add a new product I am using a large image in the "Product Description". I do want to use the small image under the catagory listing with the other products. I do not want the thumbnail or link to larger image on the actual individual product page.
Example: http://securitybycamera.com/index.php?main_page=product_info&cPath=15_18&products_id=35

From your example, it looks as though the image ia hardcoded into the product description. I'm not exactly highly knowledgeable... but I'm not aware of anything other than 'by hand' to assist with doing this.

As for removing the thumbnail all together, the code I posted above is a good start. But, just block the include for the image also.

:)

10 Apr 2007, 9:53 PM
#10
garyclemens avatar

garyclemens

New Zenner

Join Date:
Jan 2007
Location:
Florida/Missouri
Posts:
77
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Thank you for the response-it worked

23 May 2007, 6:01 AM
#11
flutre avatar

flutre

New Zenner

Join Date:
May 2007
Posts:
2
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Hi,

I am trying to embed video in .swf format.

I need to change the main file:
\includes\templates\template_default\templates\tpl_modules_main_product_image.php

more specifically this part:

<div id="productMainImage" class="centeredContent back"> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank" onclick="popupWindow(this.href); return false">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </div>

to embed the video

As far as I understood, I need to create an .swf object (which contains the image,product path, product name, and product id)
this is the .swf object, includes an already public swfobject.js (which detects the flash player):

<script type="text/javascript" src="includes/modules/pages/product_info/swfobject.js"></script> <div id="flashcontent"> This text is replaced by the Flash movie. </div> <script type="text/javascript"> var so = new SWFObject("so_tester.swf", "mymovie", "200", "100", "9", "#336699"); so.write("flashcontent"); </script>

My question is how do I make this work. How do I blend the first part of the code with the last part - the .swf object. Or is there an easier way?

Would really appreciate your help.

Thanks,
F.

26 May 2007, 2:44 PM
#13
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: How can I remove the 'Larger Image' Link?

MOD ready. Simply follow my signature's link called: Configure larger images link as it will forward you to the topic. Also reply to that topic if you request further support on this subject.

Thanks. :smile:

3 Mar 2011, 10:34 PM
#14
robertwhitis avatar

robertwhitis

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Hi, I also wanted to do this, found this thread, and figured out a better way to solve the problem, I believe.

You simply need to remove some code from the tpl_modules_main_product_image.php file.

Here is the finished file, basically, you remove the instructions from the echo commands to echo the link, and instead, make the echo commands simply echo the image itself.

<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
 */
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> 
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT); ?>');
//--></script>
<noscript>
<?php
  echo zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);
?>
</noscript>
</div>

Let me know if this helps!

:bigups:

24 Nov 2011, 10:02 AM
#15
paulr avatar

paulr

New Zenner

Join Date:
Nov 2011
Posts:
23
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

Many thanks, that works perfectly.

For any other novices like me the edited file needs to go in your custom template directory so it overides the default, for example:

/includes/templates/CUSTOM/templates/tpl_modules_main_product_image.php

Paul

12 Aug 2012, 3:38 PM
#16
hearseman avatar

hearseman

New Zenner

Join Date:
Jul 2012
Posts:
9
Plugin Contributions:
0

Re: How can I remove the 'Larger Image' Link?

If you only want the large picture to show try this in the code:
echo zen_image($products_image_large, $products_name, MAIN_IMAGE_WIDTH, MAIN_IMAGE_HEIGHT);

2 Feb 2014, 9:17 PM
#17
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: How can I remove the 'Larger Image' Link?

Because the 'larger image' link is already wrapped in a <span class="imgLink"> tag, add this to your CSS:

.imgLink {display:none}

The link will disappear.