Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2008
    Posts
    15
    Plugin Contributions
    0

    help question Want to change Larger Image link

    I wanted to know how to change the link on the Larger Image link so that instead of going to a pop up page it would link to the current products manufacturer url instead.

    I have a link on the bottom of the page that takes me to the right directory but I really want to remove that link and instead use the image thumbnail that shows the current product image to take me to the url link for that specific product.


    If you go to

    http://www.rtswinc.com/Store/

    click on RTS-Touch Panel Templates
    then select a product

    Once you get to that page you will see a label under the image
    "View Panel Gallery" (formerly "Larger Image")

    Now towards the bottom of the page the
    "VIEW THE GALLERY FOR THIS TOUCH PANEL"
    this link is set up to link to the products external web page (currently there are temporary blank pages with white text describing each page)

    I basically want the View Panel Gallery link under the image to take me to the same place that the VIEW THE GALLERY FOR THIS TOUCH PANEL link does

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Want to change Larger Image link

    You will have to remove comment out the js that does this and replace with an href to your desired page

    Do this to a COPY placed in your template override structure

    File = tpl_modules_main_product_image.php
    Code:
    <?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">
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Want to change Larger Image link

    Did you look at the pages I have online I thought if you did you could understand what I am trying to do. Seems so simple but being such a newbee to all this I could really use your help

    Sorry I am pretty novice at all this php/javascrpt stuff. I need a little more direction need to know how and where exactly to comment out the JS and syntax and also how am I going to code the the link info so that it sends people to the differnt urls for each product.

    The frustrating thing is that the product link at the bottom of the page takes me/user to the proper page. All I want to do is set it up so that each time the person clicks on the product's image it takes them to the products gallery page in a new window. Ultimately I don't really want the text link that on the bottom of the page at all and I don't want to use the pop up larger image either.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Want to change Larger Image link

    kobra's correctly stated the starting point.

    Try this:

    1. Find the code that builds the link you want to relocate. It's in tpl_product_info_display.php:
    Code:
    <!--bof Product URL -->
    <?php
      if (zen_not_null($products_url)) {
        if ($flag_show_product_info_url == 1) {
    ?>
        <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
    <?php
        } // $flag_show_product_info_url
      }
    ?>
    <!--eof Product URL -->
    2. MOVE that code to tpl_modules_main_image.php, and remove the popup link, as kobra said, replacing it with the URL link code from the other template file

    ie: the following code:
    Code:
    <?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 /><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>
    becomes
    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_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);?>
    <!--bof Product URL -->
    <?php
      if (zen_not_null($products_url)) {
        if ($flag_show_product_info_url == 1) {
    ?>
        <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
    <?php
        } // $flag_show_product_info_url
      }
    ?>
    <!--eof Product URL -->
    </div>
    That's the concept anyway.

    Be sure to save your modified files in your override folder.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

    Default Re: Want to change Larger Image link

    Im posting on this thread rather than making a new one because I been trying to do a similar thing.If someone can help me, i would really apreciate it.

    I want, what used to be my "larger image " link to direct to my contact us page. thats it.

    By the information given on this thread, i been trying to find the code that builds that link but cant find it. Pls, can someone point me in the right direction!

    http://www.allstreetsigns.com/store/...roducts_id=181
    here you can see below the products image. i already rename the "larger image" link. I just need it to take me to the contact us page.

 

 

Similar Threads

  1. v150 Larger image link not producing an image
    By dagadesign in forum General Questions
    Replies: 16
    Last Post: 16 Feb 2012, 11:59 PM
  2. Larger Image Link
    By Eric24v in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Aug 2010, 01:41 AM
  3. 'Larger Image' link - positioning???
    By stiggy100 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Apr 2010, 05:00 PM
  4. larger image link beneath product image
    By KismetDesign in forum Setting Up Categories, Products, Attributes
    Replies: 17
    Last Post: 29 Jul 2009, 03:24 PM
  5. Larger image link opens image in same window.
    By this side up in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Apr 2007, 11:36 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