Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2014
    Posts
    223
    Plugin Contributions
    0

    Default Cant perches an item.

    Item I'm having an issue with. Click on the first item 1/3 scale Super Cub. When you click it take you just to the photo. I have tried to delete and make a new one and I have the same issue. If I make one and not load a photo it works fine. Any clue what is going on.

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

    Default Re: Cant perches an item.

    You have an error somewhere in the code. check this link for more help.

    If you post the contents of the most recent store side debug file here we can help you further.

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

    Default Re: Cant perches an item.

    You're having a partial blank page. This should generate a log file as described here: https://www.zen-cart.com/content.php?124-blank-page
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2014
    Posts
    223
    Plugin Contributions
    0

    Default Re: Cant perches an item.

    [24-Dec-2017 14:10:03 UTC] PHP Warning: Illegal string offset 'cPath' in /home/cubmanky1/public_html/store/includes/classes/navigation_history.php on line 40
    [24-Dec-2017 14:10:03 UTC] PHP Warning: Illegal string offset 'products_id' in /home/cubmanky1/public_html/store/includes/classes/navigation_history.php on line 40
    [24-Dec-2017 14:10:03 UTC] PHP Warning: A non-numeric value encountered in /home/cubmanky1/public_html/store/includes/classes/categories_ul_generator.php on line 58
    [24-Dec-2017 14:10:03 UTC] PHP Warning: A non-numeric value encountered in /home/cubmanky1/public_html/store/includes/classes/categories_ul_generator.php on line 73
    [24-Dec-2017 14:10:03 UTC] PHP Warning: A non-numeric value encountered in /home/cubmanky1/public_html/store/includes/classes/categories_ul_generator.php on line 73
    [24-Dec-2017 14:10:03 UTC] PHP Warning: A non-numeric value encountered in /home/cubmanky1/public_html/store/includes/classes/categories_ul_generator.php on line 73
    [24-Dec-2017 14:10:03 UTC] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /home/cubmanky1/public_html/store/includes/modules/responsive_sheffield_blue/additional_images.php:114
    Stack trace:
    #0 /home/cubmanky1/public_html/store/includes/templates/template_default/templates/tpl_modules_additional_images.php(13): require()
    #1 /home/cubmanky1/public_html/store/includes/templates/responsive_sheffield_blue/templates/tpl_product_info_display.php(83): require('/home/cubmanky1...')
    #2 /home/cubmanky1/public_html/store/includes/modules/pages/product_info/main_template_vars.php(178): require('/home/cubmanky1...')
    #3 /home/cubmanky1/public_html/store/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php(251): require('/home/cubmanky1...')
    #4 /home/cubmanky1/public_html/store/index.php(97): require('/home/cubmanky1...')
    #5 {main}
    thrown in /home/cubmanky1/public_html/store/includes/modules/responsive_sheffield_blue/additional_images.php on line 114

    Look like I have a few items. Funny it is only just that one item. I can delete it and give it a new name, make it all new and still same issue.

  5. #5
    Join Date
    Jan 2014
    Posts
    223
    Plugin Contributions
    0

    Default Re: Cant perches an item.

    home/cubmanky1/public_html/store/includes/modules/responsive_sheffield_blue/additional_images.php on line 114
    Code:
       $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Cant perches an item.

    Is that the only product that has additional images? Would you post (in "CODE" tags, like you did before) the entire additional_images.php contents?

  7. #7
    Join Date
    Jan 2014
    Posts
    223
    Plugin Contributions
    0

    Default Re: Cant perches an item.

    just looked and its all the products with multi images.
    Code:
    <?php
    /**mod Image Handler 4.3.2
     * additional_images module
     *
     * Prepares list of additional product images to be displayed in 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: additional_images.php 18697 2011-05-04 14:35:20Z wilt $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    if (!defined('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE')) define('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE','Yes');
    $images_array = array();
    
    // do not check for additional images when turned off
    if ($products_image != '' && $flag_show_product_info_additional_images != 0) {
      // prepare image name
      $products_image_extension = substr($products_image, strrpos($products_image, '.'));
      $products_image_base = str_replace($products_image_extension, '', $products_image);
    
      // if in a subdirectory
      if (strrpos($products_image, '/')) {
        $products_image_match = substr($products_image, strrpos($products_image, '/')+1);
        //echo 'TEST 1: I match ' . $products_image_match . ' - ' . $file . ' -  base ' . $products_image_base . '<br>';
        $products_image_match = str_replace($products_image_extension, '', $products_image_match) . '_';
        $products_image_base = $products_image_match;
      }
    
      $products_image_directory = str_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
      if ($products_image_directory != '') {
        $products_image_directory = DIR_WS_IMAGES . str_replace($products_image_directory, '', $products_image) . "/";
      } else {
        $products_image_directory = DIR_WS_IMAGES;
      }
    
      // Check for additional matching images
      $file_extension = $products_image_extension;
      $products_image_match_array = array();
      if ($dir = @dir($products_image_directory)) {
        while ($file = $dir->read()) {
          if (!is_dir($products_image_directory . $file)) {
            if (substr($file, strrpos($file, '.')) == $file_extension) {
              if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
                if ($file != $products_image) {
                  if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {
                    //  echo 'I AM A MATCH ' . $file . '<br>';
                    $images_array[] = $file;
                  } else {
                    //  echo 'I AM NOT A MATCH ' . $file . '<br>';
                  }
                }
              }
            }
          }
        }
        if (sizeof($images_array)) {
          sort($images_array);
        }
        $dir->close();
      }
    }
    
    // Build output based on images found
    $num_images = sizeof($images_array);
    $list_box_contents = '';
    $title = '';
    
    if ($num_images) {
      $row = 0;
      $col = 0;
      if ($num_images < IMAGES_AUTO_ADDED || IMAGES_AUTO_ADDED == 0 ) {
        $col_width = floor(100/$num_images);
      } else {
        $col_width = floor(100/IMAGES_AUTO_ADDED);
      }
    
      for ($i=0, $n=$num_images; $i<$n; $i++) {
        $file = $images_array[$i];
        $products_image_large = str_replace(DIR_WS_IMAGES, DIR_WS_IMAGES . 'large/', $products_image_directory) . str_replace($products_image_extension, '', $file) . IMAGE_SUFFIX_LARGE . $products_image_extension;
    //  Begin Image Handler changes 1 of 2
    	if (function_exists('handle_image')) {
    		$newimg = handle_image($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, '');
    		list($src, $alt, $width, $height, $parameters) = $newimg;
    		$products_image_large = zen_output_string($src);
    	} 
    	$flag_has_large = file_exists($products_image_large);
    //  End Image Handler changes 1 of 2
        $products_image_large = ($flag_has_large ? $products_image_large : $products_image_directory . $file);
        $flag_display_large = (IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE == 'Yes' || $flag_has_large);
        $base_image = $products_image_directory . $file;
        $thumb_slashes = zen_image(addslashes($base_image), addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
    //  Begin Image Handler changes 2 of 2
    //  remove additional single quotes from image attributes (important!)
        $thumb_slashes = preg_replace("/([^\\\\])'/", '$1\\\'', $thumb_slashes);
    //  End Image Handler changes 2 of 2
        $thumb_regular = zen_image($base_image, $products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
        $large_link = zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large);
    
        // Link Preparation:
          $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
    
        $noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';
    
        //      $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript:popupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';
    
        $link = $script_link . "\n      " . $noscript_link;
        //      $link = $alternate_link;
    
        // List Box array generation:
        $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => "\n      " . $link);
        $col ++;
        if ($col > (IMAGES_AUTO_ADDED -1)) {
          $col = 0;
          $row ++;
        }
      } // end for loop
    } // endif

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

    Default Re: Cant perches an item.

    The images seen uploaded have an extension that is in all caps instead of lower case. The general suggestion for filenames is not to use capitalization and not to use spaces (not saying saw a filename with a space). Changes could be made to support uppercase, but....
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jan 2014
    Posts
    223
    Plugin Contributions
    0

    Default Re: Cant perches an item.

    That worked!!!!!!! So I do have a lot of images like
    1981 RCM July_Page_1_Image_00011.jpg
    I need to change to
    1981-RCM-July_Page_1_Image_00011.jpg
    I can change that easy and upload the photos. From a zencart side what is the quickest way to update it

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,371
    Plugin Contributions
    94

    Default Re: Cant perches an item.

    Quote Originally Posted by cubmanky View Post
    just looked and its all the products with multi images.
    Code:
    <?php
    /**mod Image Handler 4.3.2
     * additional_images module
     *
     * Prepares list of additional product images to be displayed in 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: additional_images.php 18697 2011-05-04 14:35:20Z wilt $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    if (!defined('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE')) define('IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE','Yes');
    $images_array = array();
    
    // do not check for additional images when turned off
    if ($products_image != '' && $flag_show_product_info_additional_images != 0) {
      // prepare image name
      $products_image_extension = substr($products_image, strrpos($products_image, '.'));
      $products_image_base = str_replace($products_image_extension, '', $products_image);
    
      // if in a subdirectory
      if (strrpos($products_image, '/')) {
        $products_image_match = substr($products_image, strrpos($products_image, '/')+1);
        //echo 'TEST 1: I match ' . $products_image_match . ' - ' . $file . ' -  base ' . $products_image_base . '<br>';
        $products_image_match = str_replace($products_image_extension, '', $products_image_match) . '_';
        $products_image_base = $products_image_match;
      }
    
      $products_image_directory = str_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
      if ($products_image_directory != '') {
        $products_image_directory = DIR_WS_IMAGES . str_replace($products_image_directory, '', $products_image) . "/";
      } else {
        $products_image_directory = DIR_WS_IMAGES;
      }
    
      // Check for additional matching images
      $file_extension = $products_image_extension;
      $products_image_match_array = array();
      if ($dir = @dir($products_image_directory)) {
        while ($file = $dir->read()) {
          if (!is_dir($products_image_directory . $file)) {
            if (substr($file, strrpos($file, '.')) == $file_extension) {
              if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
                if ($file != $products_image) {
                  if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {
                    //  echo 'I AM A MATCH ' . $file . '<br>';
                    $images_array[] = $file;
                  } else {
                    //  echo 'I AM NOT A MATCH ' . $file . '<br>';
                  }
                }
              }
            }
          }
        }
        if (sizeof($images_array)) {
          sort($images_array);
        }
        $dir->close();
      }
    }
    
    // Build output based on images found
    $num_images = sizeof($images_array);
    $list_box_contents = '';
    $title = '';
    
    if ($num_images) {
      $row = 0;
      $col = 0;
      if ($num_images < IMAGES_AUTO_ADDED || IMAGES_AUTO_ADDED == 0 ) {
        $col_width = floor(100/$num_images);
      } else {
        $col_width = floor(100/IMAGES_AUTO_ADDED);
      }
    
      for ($i=0, $n=$num_images; $i<$n; $i++) {
        $file = $images_array[$i];
        $products_image_large = str_replace(DIR_WS_IMAGES, DIR_WS_IMAGES . 'large/', $products_image_directory) . str_replace($products_image_extension, '', $file) . IMAGE_SUFFIX_LARGE . $products_image_extension;
    //  Begin Image Handler changes 1 of 2
        if (function_exists('handle_image')) {
            $newimg = handle_image($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, '');
            list($src, $alt, $width, $height, $parameters) = $newimg;
            $products_image_large = zen_output_string($src);
        } 
        $flag_has_large = file_exists($products_image_large);
    //  End Image Handler changes 1 of 2
        $products_image_large = ($flag_has_large ? $products_image_large : $products_image_directory . $file);
        $flag_display_large = (IMAGE_ADDITIONAL_DISPLAY_LINK_EVEN_WHEN_NO_LARGE == 'Yes' || $flag_has_large);
        $base_image = $products_image_directory . $file;
        $thumb_slashes = zen_image(addslashes($base_image), addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
    //  Begin Image Handler changes 2 of 2
    //  remove additional single quotes from image attributes (important!)
        $thumb_slashes = preg_replace("/([^\\\\])'/", '$1\\\'', $thumb_slashes);
    //  End Image Handler changes 2 of 2
        $thumb_regular = zen_image($base_image, $products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
        $large_link = zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large);
    
        // Link Preparation:
          $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
    
        $noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';
    
        //      $alternate_link = '<a href="' . $products_image_large . '" onclick="javascript:popupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';
    
        $link = $script_link . "\n      " . $noscript_link;
        //      $link = $alternate_link;
    
        // List Box array generation:
        $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
        'text' => "\n      " . $link);
        $col ++;
        if ($col > (IMAGES_AUTO_ADDED -1)) {
          $col = 0;
          $row ++;
        }
      } // end for loop
    } // endif
    Replace the highlighted line above with
    Code:
    $list_box_contents = array();
    That's what the debug-log is "complaining about".

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Calculating Shipping - First Item a Set Cost, Each Additional Item $1.00 Per Item
    By Beachcovers in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 31 Mar 2012, 04:00 AM
  2. customers cant check out and I cant get to admin
    By rdsbaker in forum General Questions
    Replies: 7
    Last Post: 27 Mar 2011, 11:05 PM
  3. Replies: 0
    Last Post: 17 Mar 2009, 03:22 AM
  4. once selected an item, cant select another in that category
    By Greybeard in forum General Questions
    Replies: 4
    Last Post: 14 May 2007, 11:41 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