Page 1 of 3 123 LastLast
Results 1 to 10 of 28
  1. #1
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Images not showing

    Im having a problem with multiple images not showing up, as well as, the large popup not working. I apparently have modded something that has caused the image script not to work. I have checked the 2 places for displaying:

    admin>config>images>product info number of additonal images =3
    admin>catalog>product type>edit layout>show product addtional images= 1

    website: www.d2eclay.com

    I dont think the scripts are loading and I dont see any errors- as if it is looking for files

    Can someone tell me what files to look at to find out why these images arent displaying.

    Thanks
    Moze

  2. #2
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    Further investigating-
    There is only one call in my_template/templates/tpl_product_info_display.php

    Line #64 : require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>

    Which is the file that assigns the additional images, I think. All other calls to this file are in default template

    It just seems that the function is not working.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Images not showing

    May have been edited out of your template file, but there should also be a section like this:

    Code:
    <!--bof Additional Product Images -->
    <?php
    /**
     * display the products additional images
     */
      require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
    <!--eof Additional Product Images -->
    to display your additional images.

    Take a look/compare between your template version of the file as compared to the template_default version of it to see what is different and be sure to understand why it is...

    As to problems with your larger image, that template file referenced does additional "work" to give the desired result(s), so kind of have to dig deeper into the code in a way doing comparison of the template file override version to the template_default version and there are possibly files in the applicable includes/modules/pages/THIS_PAGE/ folder that need to be "evaluated" for example is there a file in that directory that has been "renamed" but follows the same basic file format and ends with .php?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    This definitely where it failing. In my_template/templates/tpl_product_info_display.php

    <?php

    /**
    * display the main product image
    */
    require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php');

    echo $template;

    ?>
    When I try to echo the variable $template, the page fails to load.

    Im checking your suggestions now, MC. Thanks.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Images not showing

    Quote Originally Posted by moZe View Post
    This definitely where it failing. In my_template/templates/tpl_product_info_display.php

    <?php

    /**
    * display the main product image
    */
    require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php');

    echo $template;

    ?>
    When I try to echo the variable $template, the page fails to load.

    Im checking your suggestions now, MC. Thanks.

    Correct, echoing $template which is a class will cause an error (and a log to be generated).

    The entire section for that part in the default code looks like:

    Code:
    <!--bof Main Product Image -->
    <?php
      if (zen_not_null($products_image)) {
      ?>
    <?php
    /**
     * display the main product image
     */
       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
      }
    ?>
    <!--eof Main Product Image-->
    So what this does is go look to see if the file tpl_modules_main_product_image.php is located in your includes/templates/YOUR_TEMPLATE/templates override directory. If it is not found then it will use the template_default version of the same file. So, if you have tpl_modules_main_product_image.php in your templates override directory, then it will pull it. The default version of this file is:

    Code:
    <?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 $
     */
    ?>
    <?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(addslashes($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>
    As you can/may see in the first actual execution line, a file is "required" to be included and that is a file found in the directory DIR_WS_MODULES (Defined in includes/configure.php) that is then to use the override system again but have the name: FILENAME_MAIN_PRODUCT_IMAGE (I forget where that filename is defined, but it is part of the ZC code), anyways, that file is "included" and is required to be present otherwise the code will error at this point. Then there are the things that the module file will pull in to get the data needed to support the above code, and that, and that, etc.... Eventually if all of the files were stacked up one could see a straight run of code, but they are broken up because they serve unique purposes. Anyways... To validate that it is/is not a problem with your template, if you temporarily switch to the default ZC template, do things work like expected. If so, then the resolution should be focused primarily on your template overrides. If not, then it could be a slight mix, but at least it's a test that helps evaluate the condition(s).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    Right, lot of things to verify and trace out....
    But the require function should fill the variable $template with a path, correct?

    So if $template is defined shouldnt I be able to echo it to the screen?

  7. #7
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    OK, $template is not a string. what does it return, that I may echo to screen, to see what value it is holding?

  8. #8
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Images not showing

    Quote Originally Posted by moZe View Post
    Right, lot of things to verify and trace out....
    But the require function should fill the variable $template with a path, correct?

    So if $template is defined shouldnt I be able to echo it to the screen?
    Not necessarily. Take a look at includes/classes/template_funcs.php to see what the function (called above to return the path that is to be fed into that require. There should be no question about the ability of that function to work. It is used almost everywhere in the template files. Either the file exists in the template override directory or it doesn't. If it doesn't, then if good ZC maintenance has been maintained it will exist in the template_default directory, unless the template itself has added a new file that was never added to the file system.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    Ok, it returns a 1, so it is a binary for success?

  10. #10
    Join Date
    Jan 2016
    Location
    The Rockies
    Posts
    27
    Plugin Contributions
    0

    Default Re: Images not showing

    It does exist in both mytemplate and in template_default, but I dont know why the additional image boxes arent showing, even if they were to be blank.
    When I switch to default template, the popup works but additional images dont show up. It has got to be something ive modded somewhere.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v150 Problem with products images showing and not showing after refresh weird problem
    By kobiadato in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Sep 2016, 08:45 PM
  2. Images not showing & editing item will not fix
    By rcrosier in forum General Questions
    Replies: 6
    Last Post: 22 Oct 2010, 03:30 AM
  3. Images in a folder not showing..takes to page not found
    By schwarzes in forum Basic Configuration
    Replies: 0
    Last Post: 17 Aug 2010, 07:01 PM
  4. Replies: 2
    Last Post: 1 Oct 2008, 08:11 PM
  5. SSL and My Images not showing, or just showing when they want
    By byrd813 in forum Basic Configuration
    Replies: 0
    Last Post: 3 May 2008, 09:08 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