Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Plugin Contributions
    0

    Default Remove "larger image" link

    How does one remove the "larger image" link in the product description page?

    My images are embedded in the html (with my configuration it is much easier this way) so the larger image link is unnecessary and doesn't show a larger image just a thumbnail.
    Example:
    http://www.jambeta.com/store/index.p...roducts_id=423

    Any pointers would be very much appreciated.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Remove "larger image" link

    Well you can get rid of the text from a language file which you have obviously discovered.

    Tho get rid of the link entirely find a file called (includes/templates/yourtemplate/templatees) tpl_main_product_image. Find

    Code:
    <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>
    Change it to:

    Code:
    <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) . '</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) . '</a>';
    ?>
    </noscript>
    </div>

  3. #3
    Join Date
    Nov 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Remove "larger image" link

    What about the case when this particular file doesn't exist in a particular template (in my case "clean business")?
    Changing the file you reference in the default template doesn't seem to have any effect.

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Remove "larger image" link

    Firstly, if you have a template other than the default template that is being used and you want to change a file that is in the default but not in your own template you should:
    • copy the default version to the same place in your template
    • edit the copied version.


    Next, sorry I may have misunderstood what you are trying to do. Are you trying to get rid of the link which usually reads ' larger limage' and sits underneath the main image. Or are you trying to get rid of the functionality of clicking on the image to get a pop-up?

    If it is the first then my previous post covered it.

    If it is the second ( i.e. you want the image just to be an image rather than a link to a larger image ) then......

    Find the same bit of code:

    Code:
    <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) . '</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) . '</a>';
    ?>
    </noscript>
    </div>
    And change it to:

    Code:
    <div id="productMainImage" class="centeredContent back">
    <?php echo zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);?>
    </div>

  5. #5
    Join Date
    Nov 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Remove "larger image" link

    Thanks much for your quick response.... Sorry but I'm still a bit lost...
    I'm finding this file under the default template:
    includes/templates/template_default/templates/tpl_modules_main_product_image.php

    but not:
    includes/templates/template_default/templates/tpl_main_product_image.php

    Is this the file I need to copy over and then edit iside of the template I'm using?

  6. #6
    Join Date
    Nov 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Remove "larger image" link

    To answer my own question, yes!!!

    This has solved my problem, and i greatly appreciate your help!!!

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Remove "larger image" link

    Yes, this is the override system at work

    What it means is that you never edit the files in the default template. This has all kinds of advantages:
    • you always keep the default template functional
    • you always can refer to the files in the default template as a reference
    • your alterations won't be overwritten by an upgrade of zen cart
    • and more...


    So, yes you need to copy:

    includes/templates/template_default/templates/tpl_modules_main_product_image.php

    to:

    includes/templates/yourtemplate/templates/tpl_modules_main_product_image.php

    You need to replace where I have written 'yourtemplate' with the name of you own template!

    Then you will have one version of this file in the default template and one version of it in yourtemplate. Zen Cart will choose which one to use based on which template you are using.

    This means that you can edit the version knowing that you can only mess up that template and if the worse comes to the worse you can revert to the default template that you haven't fiddled with. It won't come to that though

  8. #8
    Join Date
    Sep 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: Remove "larger image" link

    I've got it like I want it now.
    Thanks for the assist niccol!

  9. #9
    Join Date
    Oct 2007
    Posts
    32
    Plugin Contributions
    0

    Default Re: Remove "larger image" link

    That file is now called tpl_modules_main_product_image.php as of 1.3.9b and it still works, thanks!

 

 

Similar Threads

  1. v150 remove the “Larger image" Link.
    By Bob_L in forum Customization from the Admin
    Replies: 1
    Last Post: 30 Jul 2012, 07:54 AM
  2. Remove "larger image" when no image for product?
    By maineiac13 in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 2 Oct 2009, 12:52 AM
  3. "larger image" link & thumbnail link not working
    By tracyselena in forum General Questions
    Replies: 1
    Last Post: 7 Nov 2007, 08:03 AM

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