Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2018
    Location
    Minneapolis, Minnesota USA
    Posts
    9
    Plugin Contributions
    0

    Default Unable to get popup image to show on Products Info page

    Hello. I have zen cart v1.5.5.f installed on my site. I've also installed a Theme Monster template, theme688. In addition to all of this I've installed Stock_By_Attributes (SBA), the Combined Master version that should work all they way up to ZC 1.5.5. Everything works fine until I get to the Products Info page. It's there I click on the image to show a larger image and a popup appears, but no image.

    I've also got a zen cart install similar to the above EXCEPT I didn't install SBA. On this version it works fine.

    The problem appears to be in tpl_modules_main_product_image.php file. Here is the code for the nonworking file:

    <?php
    /**
    * Module Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2011 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 18698 2011-05-04 14:50:06Z wilt $
    *
    * Updated for Stock by Attributes 1.5.3.1
    */
    ?>
    <?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="javascriptopupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image(addslashes($products_image_medium), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT,'id="SBA_ProductImage"') . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '<\/span><\/a>'; ?>');
    //--></script>
    <noscript>
    <?php
    echo '<a href="' . zen_href_link($products_image_large, . '' . 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>

    I've compared this code to the file that works on the non_SBA version, which uses a simple <href> link versus a javascript popup window here. I'm certain based on my own tests, the problem is in the DOCUMENT.WRITE line of code. However, I'm lost from there on. Help!

    Thanks in advance.

    P.S. I've also, as a test, removed what looks like html comment tags from that particular line...no difference.

    P.S.S my test zen cart site is at: yarndogPress.com/zencartTest
    Last edited by loveSeesAllColors; 18 Sep 2018 at 02:21 AM.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Unable to get popup image to show on Products Info page

    First of all, may want to address/correct the html validation errors on the page, then I got these javascript errors when clicking on the main product image:
    1. HTTP403: FORBIDDEN - The server understood the request, but is refusing to fulfill it.
      GET - http://yarndogpress.com/zencartTest/...-btn-close.gif

    2. HTTP403: FORBIDDEN - The server understood the request, but is refusing to fulfill it.
      GET - http://yarndogpress.com/zencartTest/...co-loading.gif



    Perhaps could use a slightly more modern lightbox/colorbox tool that possibly works with jQuery more recent than 1.7.1?

    Or perhaps making sure that the folder permissions support retrieving the image(s) as when I try to access those directly I get an error message like:
    Forbidden

    You don't have permission to access /zencartTest/images/lightbox/lightbox-btn-close.gifon this server.
    Additionally, a 403 Forbiddenerror was encountered while trying to use an ErrorDocument to handle the request.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2018
    Location
    Minneapolis, Minnesota USA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Unable to get popup image to show on Products Info page

    ...mmm, i checkout out the permissions. It appears I donīt even have an ./images/lightbox folder to begin with....mmm....maybe this is the problem! Is the ./images/lightbox folder something zen cart creates or am I supposed to created it an populate it? I go look at what the forums say....thanks for your reply to my post :)

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Unable to get popup image to show on Products Info page

    Quote Originally Posted by loveSeesAllColors View Post
    ...mmm, i checkout out the permissions. It appears I donīt even have an ./images/lightbox folder to begin with....mmm....maybe this is the problem! Is the ./images/lightbox folder something zen cart creates or am I supposed to created it an populate it? I go look at what the forums say....thanks for your reply to my post :)
    No, images/lightbox is not a default ZC folder. Also not sure in which images directory that is expected to be referencing, but it relates to the template or other lightbox related plugin has been installed or included.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: Unable to get popup image to show on Products Info page

    Looks like you got it.

    Don't forget to post the fix so that others may benefit.

  6. #6
    Join Date
    Oct 2007
    Location
    Stevenage, GB
    Posts
    70
    Plugin Contributions
    0

    Default Re: Unable to get popup image to show on Products Info page

    highly recommend to use the lightbox or ajax pop-up script (spoiled by choice in google and normally very easy to implement), as old javascript can be blocked by browser

  7. #7
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Unable to get popup image to show on Products Info page

    Quote Originally Posted by web-project View Post
    highly recommend to use the lightbox or ajax pop-up script (spoiled by choice in google and normally very easy to implement), as old javascript can be blocked by browser
    Curious about how ajax will still work when blocking javascript, as you will still need it to make ajax calls? Care to elaborate?

  8. #8
    Join Date
    Sep 2018
    Location
    Minneapolis, Minnesota USA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Unable to get popup image to show on Products Info page

    I installed lightbox and got same results. Everything works fine until click picture (or Larger Image link) on Product Info Page and then a page pops up, but no image. I can go into Admin>Configuration and see the settings for Lightbox, but I still donīt have a ./images/lightbox folder that, I think, should contain the images the Lightbox Mod uses. Do I create that folder or should it have been created by Lightbox during install?

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Unable to get popup image to show on Products Info page

    Quote Originally Posted by loveSeesAllColors View Post
    I installed lightbox and got same results. Everything works fine until click picture (or Larger Image link) on Product Info Page and then a page pops up, but no image. I can go into Admin>Configuration and see the settings for Lightbox, but I still donīt have a ./images/lightbox folder that, I think, should contain the images the Lightbox Mod uses. Do I create that folder or should it have been created by Lightbox during install?
    Which "lightbox" app did you try to install? I know zen colorbox works and offers a similar lightbox feature.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Sep 2018
    Location
    Minneapolis, Minnesota USA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Unable to get popup image to show on Products Info page

    I installed Lightbax 1.7.1, I think, itś the latest download

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 31 Mar 2013, 04:18 PM
  2. Unable to get an image to show on the home page
    By bhensarl in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 14 Apr 2011, 02:07 PM
  3. Image Handler: Can not get image to display on product info page
    By weezee in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 24 Oct 2010, 04:31 AM
  4. How to show catagory new products index in products info page?
    By eric2008 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Jun 2008, 03:22 PM
  5. Unable to get buttons to line up on products page
    By nigelt74 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Jul 2007, 01:22 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