Results 1 to 10 of 3244

Threaded View

  1. #11
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Cherry Zen Template Support Thread

    I found post 2075 in this thread that appears to be a fix for this issue (described as an issue with shadows so I didn't catch that initially), but it was a entire file replace of tpl_modules_main_product_image.php (that ships with v1.4 of Zen Lightbox) Zen Lightbox is now at v1.5.
    http://www.zen-cart.com/forum/showpo...postcount=2075

    When comparing v1.4 of tpl_modules_main_product_image.php and v1.5 there appears to be some changes that makes we worried about doing an entire copy and paste fix for v1.4. Since I was testing anyway, I did a complete copy and paste and it actually fixed the image problem, but it created a new problem with duplicating images (described in more detail below).

    Thinking this had to do with new v1.5 Zen Lightbox code in tpl_modules_main_product_image.php that was overwritten in the fix for v1.4, I looked at what the fix actually changed and applied only those specific changes to the v1.5 Zen Lightbox code and copied in only the specific changes in the fix for v1.4. It still fixed the problem, but the same issue arises with duplication of additional images.


    Duplication of First Additional Image in popup gallery- side effect to the fix posted below.
    When you have additional images on your product, Zen Lightbox will add a NEXT and a PREV to your main product image when you click the image to enlarge it. If you click NEXT, it duplicates the first image again. If you click next it will then go on to the actual next additional image.

    If you don't have any additional images, it will still add a NEXT and a PREV to your main product image when you click the image to enlarge it. If you click NEXT, it duplicates that image again as it thinks it's an additional image (says there are 2 images in the gallery).

    I can't figure out where it's duplicating the first image and thinking it's an additional image even if you don't have an additional image. Any ideas?


    So, for anyone using Zen Lightbox v1.5 and Cherry Zen template v1.7 and you notice the issue on your product page with a vertically extended image border/background/shadow, the following copy and replace below will fix that.

    NOTE: Again, this fixes the one problem, but has a side effect causing your first image to be considered an additional image and duplicate it when clicking through the popup gallery (even if you only have one image). Anyone know how to fix that?


    Replace all of the following code inside of /includes/templates/cherry_zen/templates/tpl_modules_main_product_image.php (Zen Lightbox v1.5 file)

    Code:
    <?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>


    With this (I highlighted in pink all that changed to fix the issue):

    Code:
    <?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="productImage" 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 '<div id="productMainImage"><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) . '</div><br class="clearBoth" /><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 '<div id="productMainImage"><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) . '</div><br class="clearBoth" /><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>
    Last edited by Crunch; 13 Jan 2010 at 01:03 AM.

 

 

Similar Threads

  1. Simple Zen Template - Support Thread
    By jettrue in forum Addon Templates
    Replies: 461
    Last Post: 27 Apr 2013, 01:33 AM
  2. Fresh Zen -- JellyFish Template Support Thread
    By magicbox in forum Addon Templates
    Replies: 93
    Last Post: 11 Apr 2012, 08:54 AM
  3. Free Template "Future Zen" v1.2 Support Thread
    By kuroi in forum Addon Templates
    Replies: 69
    Last Post: 16 Jul 2010, 06:00 AM
  4. Mix Cherry Zen Template with Default template
    By Globie in forum General Questions
    Replies: 1
    Last Post: 31 Oct 2008, 08:21 PM

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