Results 1 to 10 of 3727

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    14
    Plugin Contributions
    0

    link problem Re: Zen Lightbox...

    Hello,

    I have one layout issue that I believe is related to the Zen lightbox mod. I thought I installed Zen lightbox successfully. All images were showing up beautifully with the mod. It was when I needed to fix the layout of tpl_products_review_default.php that I came across an unwanted text link that displays the product name and is hyperlinked to the enlarged image using the lightbox mod. I have attached a .jpg of this problem. It sits on the bottom left corner of the product image.

    I've tried copying the original tpl_products_review_default.php from the default template, but really this was useless because this problem was already there before I even started tweaking this page. I've tried deleting everything else on tpl_products_review_default.php except for the image to determine which part of the page this extra text link is coming from, and it's definitely linked to the product image somehow. This is the only page that this problem shows up in. All the other product image pages are perfect.

    When I view the source code of the page, this section is written as follows:

    .
    .
    .
    <div id="productReviewsDefaultProductImage" class="centeredContent back">

    <div id="productMainImage" class="centeredContent back">
    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="images/large/carmen_designerhandbag_palema_LRG.jpg" rel="lightbox-g" title="Carmen<br /><span class=\"smallText\">[Carmen]</span>"><img src="images/medium/carmen_designerhandbag_palema_MED.jpg" alt="Carmen [Carmen]" title=" Carmen [Carmen] " width="230" height="210" /><br /><span class="imgLink">larger image</span></a>');
    //--></script>
    <noscript>
    <a href="http://wickedmango.com.au/palema/index.php?main_page=popup_image&amp;pID=51" target="_blank"><img src="images/medium/carmen_designerhandbag_palema_MED.jpg" alt="Carmen [Carmen]" title=" Carmen [Carmen] " width="230" height="210" /><br /><span class="imgLink">larger image</span></a></noscript>

    </div>
    <div class="buttonRow">
    <a href="http://wickedmango.com.au/palema/index.php?main_page=product_reviews&amp;products_id=51&amp;action=buy_now"><img src="includes/templates/palema/buttons/english/button_in_cart.gif" alt="Add To Shopping My Bag" title=" Add To Shopping My Bag " width="178" height="30" /></a><br /></div>

    </div>
    .
    .
    .
    I thought that there was a closing html tag omitted after title="Carmen ... (in red) so I looked at tpl_modules_main_product_image.php, but I really can't see anything out of place. The source code of tpl_modules_main_product_image.php is:

    <?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">
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php
    if (ZEN_LIGHTBOX_STATUS == 'true') {
    if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
    $rel = 'lightbox-g';
    } else {
    $rel = 'lightbox';
    }
    ?>
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="' . $rel . '" title="' . addslashes($products_name) . '">' . 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>
    <?php } else { ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <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>
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php } ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <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>
    (NB. I've added an extra space between : and p in the javascript call above to prevent the smily from appearing in this post)

    I'm using Zencart v1.38a. Other addons that were previously installed include: About Us Page, Column Divider Pro, Column Layout Grid, CSS Menu, Flash Hacks, Newsletter Subscribe, Time Zone Offset and RFQ.

    I'm sure it's something really simple but for the life of me I can't see it and it's slowly driving me insane. Can anyone help me?

  2. #2
    Join Date
    Feb 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Sorry, I forgot to add the php code for tpl_product_reviews_default.php

    Code:
    <?php
    /**
     * Page Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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_product_reviews_default.php 4852 2006-10-28 06:47:45Z drbyte $
     */
    ?>
    <div class="centerColumn" id="reviewsDefault">
    
    <div id="productReviewsDefaultProductImage" class="centeredContent back">
    <?php
      if (zen_not_null($products_image)) {
      /**
       * require the image display code
       */
    ?>
    <?php require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
    <?php
      }
    ?>
    <!--bof Add to Cart Box -->
    <div class="buttonRow">
    <?php
            // more info in place of buy now
            if (zen_has_product_attributes($review->fields['products_id'] )) {
              //   $link = '<p>' . '<a href="' . zen_href_link(zen_get_info_page($review->fields['products_id']), 'products_id=' . $review->fields['products_id'] ) . '">' . MORE_INFO_TEXT . '</a>' . '</p>';
              $link = '';
            } else {
              $link= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'reviews_id')) . 'action=buy_now') . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
            }
            $the_button = $link;
            $products_link = '';
            echo zen_get_buy_now_button($review->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($review->fields['products_id']);
          ?>
    </div>
    <!--eof Add to Cart Box -->
    
    </div>
    
    
    
    <!-- bof align right column-->
    <div id="productReviewsRightColumn">
    
    <h3 id="productReviewsDefaultHeading"><?php echo $products_name . $products_model; ?></h3>
    
    <h2 id="productReviewsDefaultPrice" class=""><?php echo $products_price; ?></h2>
    <div id="productReviewsDefaultProductPageLink" class="buttonRow"><?php echo '<a href="' . zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('reviews_id'))) . '">' . zen_image_button(BUTTON_IMAGE_GOTO_PROD_DETAILS , BUTTON_GOTO_PROD_DETAILS_ALT) . '</a>'; ?></div>
    
    <div class="buttonRow"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array('reviews_id'))) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
    </div>
    
    <!-- eof align right column-->
    
    <br class="clearBoth" />
    
    <?php
      if ($reviews_split->number_of_rows > 0) {
        if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
    
    <div id="productReviewsDefaultListingTopNumber" class="navSplitPagesResult"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div>
    
    <div id="productReviewsDefaultListingTopLinks" class="navSplitPagesLinks"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'main_page'))); ?></div>
    
    <?php
        }
        foreach ($reviewsArray as $reviews) {
    ?>
    <hr />
    
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . (int)$_GET['products_id'] . '&reviews_id=' . $reviews['id']) . '">' . zen_image_button(BUTTON_IMAGE_READ_REVIEWS , BUTTON_READ_REVIEWS_ALT) . '</a>'; ?></div>
    
    <div class="productReviewsDefaultReviewer bold"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, zen_date_short($reviews['dateAdded'])); ?>&nbsp;<?php echo sprintf(TEXT_REVIEW_BY, zen_output_string_protected($reviews['customersName'])); ?></div>
    
    <div class="rating"><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $reviews['reviewsRating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviewsRating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviewsRating']); ?></div>
    
    <div class="productReviewsDefaultProductMainContent content"><?php echo zen_break_string(zen_output_string_protected(stripslashes($reviews['reviewsText'])), 60, '-<br />') . ((strlen($reviews['reviewsText']) >= 100) ? '...' : ''); ?></div>
    
    
    <br class="clearBoth" />
    <?php
        }
    ?>
    <?php
      } else {
    ?>
    <hr />
    <div id="productReviewsDefaultNoReviews" class="content"><?php echo TEXT_NO_REVIEWS . (REVIEWS_APPROVAL == '1' ? '<br />' . TEXT_APPROVAL_REQUIRED: ''); ?></div>
    <br class="clearBoth" />
    <?php
      }
    
      if (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
    ?>
    <hr />
    <div id="productReviewsDefaultListingBottomNumber" class="navSplitPagesResult"><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></div>
    <div id="productReviewsDefaultListingBottomLinks" class="navSplitPagesLinks"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'main_page'))); ?></div>
    
    <?php
      }
    ?>
    
    
    
    </div>

  3. #3
    Join Date
    Feb 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    And here is the jpg attachment ...
    Attached Images Attached Images  

  4. #4
    Join Date
    Feb 2009
    Posts
    14
    Plugin Contributions
    0

    Default Re: Zen Lightbox...

    Whew! Finally found the answer I was looking for thanks to Nick's solution (http://www.zen-cart.com/forum/showth...views&page=126). Turns out I was using the wrong search term (initially 'product reviews page' ... changed it to just 'reviews') which was why I overlooked this post. Got rid of the extra text link next to the product image. Thanks so much Nick. And thank you Alex for creating such a classy contribution!

 

 

Similar Threads

  1. Free Shipping Rules addon [Support Thread]
    By numinix in forum Addon Shipping Modules
    Replies: 36
    Last Post: 2 Dec 2016, 01:56 PM
  2. v151 Reviews Reply addon [Support Thread]
    By mikestaps in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 17 Oct 2014, 01:29 AM
  3. Jquery Lightbox [Support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 257
    Last Post: 2 Aug 2012, 10:57 PM
  4. File Upload Required addon [Support Thread]
    By 1100101 in forum All Other Contributions/Addons
    Replies: 21
    Last Post: 10 Dec 2011, 03:00 AM
  5. [Support Thread] IE only JavaScripts and Stylesheets Addon
    By Meshach in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 31 May 2011, 08:18 PM

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