Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2018
    Location
    Dunoon
    Posts
    6
    Plugin Contributions
    0

    Default Additional Images Popup Problem

    Hi there, I am looking for some help regarding the pop ups on additional photos within a listing. I’ve searched the forum but can’t see anyone else with this particular problem so I can only assume I am the problem!

    I uploaded my first listing last night with additional photos. I named the images as follows:
    Woodland.jpg
    Woodland_01.jpg
    Woodland_02.jpg etc

    I then used my ftp program (I think that’s what it’s called) to upload the relevant images to my images/large folder in the following format:

    Woodland_LRG.jpg
    Woodland_01_LRG.jpg etc

    The listing looks fine, all the images are displaying correctly on the listing itself it’s when I click the image the pop up displays as the first large image. The thing that is confusing me is the url on the pop up corresponds with the correct image yet the wrong photo is showing. Can anyone tell me where I am going wrong? I thought that perhaps it was a template problem but I switched to the original Zen cart template and the same thing happens. I also thought I’d maybe named the images incorrectly so changed them to Woodland01. Jpg, Woodland01_001. Jpg etc still the same problem. I don’t even know why I thought that would help haha!

    I am using zen art 1.5.5D and this is the listing in question:

    http://www.rainbowandgrey.co.uk/inde...roducts_id=426

    I am a bit of a novice at this so please accept my apologies!

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Additional Images Popup Problem

    If you hover over each image you'll notice the link address it's pointing at is not matching the actual link location on the additional images.

    Working:
    Main Image
    javascript popupWindow('http://www.rainbowandgrey.co.uk/index.php?main_page=popup_image&pID=426&zenid=2c0054315de7ee64573e005c0c102f48')

    <img src="images/SC Childrens Character Cards/Woodland.jpg" alt="Woodland Themed Baby Milestone Cards" title=" Woodland Themed Baby Milestone Cards " width="300" height="300">

    Additional Image Not Working:
    IMG 7 - copy link location
    javascript popupWindow('http://www.rainbowandgrey.co.uk/index.php?main_page=popup_image_additional&pID=426&pic=6&products_image_large_ad ditional=images%2Flarge%2FSC+Childrens+Character+Cards%2FWoodland_007_LRG.jpg&ze nid=2c0054315de7ee64573e005c0c102f48')

    IMG 7 - HTML source

    <img src="images/SC Childrens Character Cards/Woodland_007.jpg" alt="Woodland Themed Baby Milestone Cards" title=" Woodland Themed Baby Milestone Cards " width="200" height="200">


    Your includes/modules/YOUR_TEMPLATE/additional_images.php is not interpreting this code correctly for your files/directories:
    PHP Code:
      for ($i=0$n=$num_images$i<$n$i++) {
        
    $file $images_array[$i];
        
    $products_image_large str_replace(DIR_WS_IMAGESDIR_WS_IMAGES 'large/'$products_image_directory) . str_replace($products_image_extension''$file) . IMAGE_SUFFIX_LARGE $products_image_extension;
        
    $flag_has_large file_exists($products_image_large);
        
    $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_WIDTHSMALL_IMAGE_HEIGHT);
        
    $thumb_regular zen_image($base_image$products_nameSMALL_IMAGE_WIDTHSMALL_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 type="text/javascript"><!--' "\n" 'document.write(\'' . ($flag_display_large '<a href="javascript:popupWindow(\\\'' str_replace($products_image_largeurlencode(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 notback"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => "\n      " $link); 

    I am NOT using the _LRG suffix just the matching image name within the same directory as the main image. This is properly showing the stock Product Additional Images when clicking to enlarge.

    Have a look http://twitchtoo.com/tR_codeSHOP/ind...&products_id=3
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  3. #3
    Join Date
    Feb 2018
    Location
    Dunoon
    Posts
    6
    Plugin Contributions
    0

    Default Re: Additional Images Popup Problem

    Thank you so much for taking the time to reply twitchtoo.

    Your includes/modules/YOUR_TEMPLATE/additional_images.php is not interpreting this code correctly for your files/directories:
    I am using the Dover Fine template and had a look at the directory you mentioned above and there is no "additional_images.php" file. Is this the problem? Can I create one using the PHP code you posted or is that me being silly? (I told you I am a complete novice )

 

 

Similar Threads

  1. v153 Remove image popup from additional images
    By JimboGee in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 18 Jul 2015, 03:17 PM
  2. v151 Additional images popup and jquery
    By delia in forum General Questions
    Replies: 5
    Last Post: 3 Jul 2014, 01:15 PM
  3. Additional images not showing in popup
    By wj694 in forum General Questions
    Replies: 8
    Last Post: 17 Apr 2013, 06:48 PM
  4. changing popup windows for additional images?
    By cchan in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Dec 2010, 06:21 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