Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Additional Product Images not displaying

    My additional images stopped showing up at some point.... best I can trace it to is that the directory isn't reading?

    I added some debug code to the additional_images folder.

    PHP Code:
    $d $products_image_directory;
        echo 
    $d.'<br />';

        
    // Open a known directory, and proceed to read its contents
        
    if (is_dir($d)) {
                echo 
    "is a directory."."\n";
            if (
    $dh opendir($d)) {
                while ((
    $file readdir($dh)) !== false) {
                    echo 
    "filename: $file : filetype: " filetype($d $file) . "\n";
                }
                
    closedir($dh);
            }
        }
        
        
    $d = @dir($products_image_directory) or die("getFileList: Failed opening directory $products_image_directory for reading"); 
    which results in...

    "/images/apogee_products/
    getFileList: Failed opening directory /images/apogee_products/ for reading"

    Now, if i add "DIR_FS_CATALOG." to the code (just above the debug)...

    PHP Code:
    $products_image_directory str_replace($products_image''substr($products_imagestrrpos($products_image'/')));
      if (
    $products_image_directory != '') {
        
    $products_image_directory DIR_FS_CATALOG.DIR_WS_IMAGES str_replace($products_image_directory''$products_image) . "/";
      } else {
        
    $products_image_directory DIR_FS_CATALOG.DIR_WS_IMAGES;
      } 
    it gives me the directory /home/***/public_html/beta//images/apogee_products/ which then actually reads as a directory and proceeds with the code, and finds the appropriate additional images. But, it's got that // after beta since DIR_FS_CATALOG ends with a slash and DIR_WS_IMAGES begins with one, which then causes the display image path to be wonky and results in broken images.

    Modules installed that may affect things:
    IH4
    Zen Lightbox 1.7.0 (seems to work fine)
    Edify template from themeforest

    All file/folder permissions for /images are set to 755.

    Some of my main product images are also tiny (using the small size instead of the medium), but I haven't looked into that enough to give you guys more info.

    ApogeeRockets.com
    beta.apogeerockets.com <-- where i've been testing the above code

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

    Default Re: Additional Product Images not displaying

    DIR_WS_IMAGES should not start with a /...
    Remove it and your problem should be solved.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Additional Product Images not displaying

    Quote Originally Posted by mc12345678 View Post
    DIR_WS_IMAGES should not start with a /...
    Remove it and your problem should be solved.
    There was a / in the DIR_WS_CATALOG configure, which when I removed, resolved the images problem (that configure also affects DIR_WS_IMAGES).

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

    Default Re: Additional Product Images not displaying

    Quote Originally Posted by apogeerockets View Post
    There was a / in the DIR_WS_CATALOG configure, which when I removed, resolved the images problem (that configure also affects DIR_WS_IMAGES).
    It affects a lot more than that and if you review the notes of at least any recent includes/configure.php file will see that the DIR_WS_CATALOG is supposed to end with a slash... take a look at includes/dist-configure.php for an example of how the DIR_WS_ constants are structured...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Additional Product Images not displaying

    Quote Originally Posted by mc12345678 View Post
    It affects a lot more than that and if you review the notes of at least any recent includes/configure.php file will see that the DIR_WS_CATALOG is supposed to end with a slash... take a look at includes/dist-configure.php for an example of how the DIR_WS_ constants are structured...
    Yeah, it only works on my beta site -- not the live?? So, obviously that is not the solution.

  6. #6
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: Additional Product Images not displaying

    Found it. There was a DIR_WS_CATALOG before my images/ folder. I have no idea when that got accidentallly pasted in? Removing that fixed it.

    PHP Code:
      define('DIR_WS_IMAGES'DIR_WS_CATALOG.'images/');
      
    define('DIR_WS_INCLUDES''includes/');
      
    define('DIR_WS_FUNCTIONS'DIR_WS_INCLUDES 'functions/');
      
    define('DIR_WS_CLASSES'DIR_WS_INCLUDES 'classes/');
      
    define('DIR_WS_MODULES'DIR_WS_INCLUDES 'modules/');
      
    define('DIR_WS_LANGUAGES'DIR_WS_INCLUDES 'languages/');
      
    define('DIR_WS_DOWNLOAD_PUBLIC'DIR_WS_CATALOG 'pub/');
      
    define('DIR_WS_TEMPLATES'DIR_WS_INCLUDES 'templates/'); 

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

    Default Re: Additional Product Images not displaying

    Couldn't tell ya of course. :)

    Glad the appropriate fix worked and that back in picture showing business. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Additional Images Not Displaying
    By JerseyGirl in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Aug 2011, 05:27 AM
  2. additional images not displaying
    By jenpen in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 16 Apr 2010, 03:55 PM
  3. Additional Product Images not displaying Large
    By rachaelosaurus in forum General Questions
    Replies: 12
    Last Post: 15 Apr 2010, 07:31 PM
  4. Product Info Page Additional Images Not Displaying After Upgrade
    By OutdoorsInteriors in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 25 Jan 2009, 08:13 PM
  5. Additional Product Images Not Displaying
    By wildcat82 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 5 Aug 2006, 03:17 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