Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2007
    Posts
    42
    Plugin Contributions
    0

    Default Anyway to turn of the "Larger Image" link and clickable picture?

    I do not have addition images for the products I sell, and the picture I use are the exact size of the thumbnail picture in the product display. is there anyway to turn off the larger image link below the image and make the image not clickable to pull up the windows for the larger image? Its just not needed for what im selling.

    Thank you!

  2. #2
    Join Date
    Dec 2006
    Location
    UK
    Posts
    32
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    After a lot of hunting around and searching I found the solution below turns the 'larger image' off. I thought that a much more straightforward option would be available. We don't always want a larger image option.
    Change \includes\templates\template_default\templates\tpl _modules_main_product_image.php to:


    <?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>
    </noscript>
    </div>

    Please let me know if anyone thinks the code is inaccurate. It worked for me.
    Josh.
    Last edited by nicedreams; 23 Jul 2007 at 01:49 PM. Reason: Spelling

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Note: Instead of changing the file in /template_default, make a copy, edit and save in your custom template folder: /includes/templates/your_template/templates/tpl_modules_main_product_image.php.

    I think you are being a bit overcomplicated. Using javascript to display a static image is unnecessary, and having nothing in the <noscript> option means anyone with js off will not be able to see the image at all.
    I think you can eliminate the js entirely here and just say
    PHP Code:
    ...
    <?php require(DIR_WS_MODULES zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
    <div id="productMainImage" class="centeredContent back">
    <?php echo  zen_image($products_image_mediumaddslashes($products_name), MEDIUM_IMAGE_WIDTHMEDIUM_IMAGE_HEIGHT); ?>
    </div>
    Last edited by gjh42; 2 Nov 2007 at 07:09 AM.

  4. #4
    Join Date
    Oct 2007
    Location
    Salisbury Wiltshire UK
    Posts
    10
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Thanks Glenn and Josh for solving this problem. I have been trying to figure out how to remove the JS element of this for some time now. Although Josh's solution does solve the problem, Glenn's is cleaner and works just as well.

  5. #5
    Join Date
    Dec 2006
    Location
    UK
    Posts
    32
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Yes, I agree.

  6. #6
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    help question Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Glenn,

    Is there a way to add a link to the code you posted here? I'm not very familiar with php and I'm shooting for the same concept, but with an image that links to another page on the site.
    John L.
    MultiMedia Designer

  7. #7
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    This worked for the main image, but not additional images, and anyone know how this will work with Slimbox installed?

  8. #8
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    806
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Any idea why this isn't working for me? Won't get rid of larger image text or the ability to click on the medium image.

    John

  9. #9
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    806
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    I seem to be having some troubles in my test store. This worked fine in the live store. Thank you.

    John

  10. #10
    Join Date
    Apr 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Anyway to turn of the "Larger Image" link and clickable picture?

    Hide the link in your stylesheet. It's called .imgLink.

    .imgLink{
    display: none;
    }

    This doesn't kill the javascript option but that's no big deal.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Main Page: "New" Products - turn off clickable link and DISPLAY new products
    By lissa in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Sep 2014, 02:20 AM
  2. "larger image" link to pop up different picture
    By JayEx in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Nov 2007, 02:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR