Page 38 of 39 FirstFirst ... 2836373839 LastLast
Results 371 to 380 of 385
  1. #371
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    Phil - You might be busy, but i had to ask the questions.

    If you have multiple images (2-3) on your products info page, do they show as intended with jqzoom?
    1. main image zoom-able, from medium to large?
    2. smaller images enlarged to medium inside of the main product image once click on, from small to medium. And zoom-able as you hover over them, from medium to large?
    Using Zen Cart 1.5.1

  2. #372
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    I am still trying to get this to work.
    For a product with a single image, jqzoom functions perfectly. Having images in the following structure:
    Small image: images/Image01.jpg
    Medium image: images/medium/ Imager01_MED.jpg
    Large image: images/large/ Imager01_LRG.jpg

    -For any products with more than one image, when product page shows up, main image shows up as (medium size, good quality image) and when I hover over it, I get the zoom effect.

    When I click on the second image, or any of the other thumbnails, the image shows up as low res (it seems that it is enlarging the small image to fit the main image box, when I try to hover over it, it the shows the small image actual size.

    So I change the code in jqzoom in /includes/modules/MyTemplate/additional_images.php and removed the comments
    From:
    //removed below for image swap and jquery zoom logic used from above instead
    // $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;
    $flag_has_large = file_exists($products_image_large);
    //removed below for image swap and jquery zoom logic used from above instead
    // $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);
    $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);
    TO:
    //removed below for image swap and jquery zoom logic used from above instead
    $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;
    $flag_has_large = file_exists($products_image_large);
    //removed below for image swap and jquery zoom logic used from above instead
    // $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);
    $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);
    Now on a multi-image product, when thumbnails are clicked, it shows a blured version of the clicked image in the main product image, I think it is enlarging the small image again. And when I hover over it, it now shows the large image.

    Why am I getting the small image, enlarged when I click on any of the thumbnail?

    Help
    Using Zen Cart 1.5.1

  3. #373
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    What area of the code, php handles the part, when the thumbnail image is clicked; the thumbnail image is displayed in the main product image area?

    When I click on the thumbnail I am getting the small image enlarged, instead of the medium image!

    Struggling here and I have to solve this problem.
    Last edited by Kevin205; 25 Apr 2013 at 04:26 PM.
    Using Zen Cart 1.5.1

  4. #374
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    There is an issues with this mod, when sub-directories are created under image folders small(root of image Dir), medium and large.

    With a fresh install of Zen 1.5.1 files, when the small, medium & large image are at the root and not in a sub-directory, everything works fine. But as soon as I want to organize the images and add a sub-directory (for different manufacturers), the links break.

    Zoom Works Perfectly, small thumbnails, medium and large images, as well as image swapping and zoom effect. With the following directory structure:
    Small images:
    images/ImageA.jpg
    images/ImageA_01.jpg
    Medium images:
    images/medium/ImageA_MED.jpg
    images/medium/ImageA_01_MED.jpg
    Large images:
    images/large/ImageA_LRG.jpg
    images/large/ImageA_01_LRG.jpg

    html code view:
    <div class="additionalImages centeredContent back" style="width:50%;">
    <a class="bonzer" href="javascript:void(0);" rel="{gallery: 'product_info', smallimage: 'images/medium/04098_01_MED.jpg',largeimage: 'images/large/04098_01_LRG.jpg'}"><img src="images/04098_01.jpg" alt="" width="80" height="80" /></a>
    <noscript><a href="http://localhost/ZenDemo/index.php?main_page=popup_image_additional&amp;pID=2&amp;pic=0&amp;products_imag e_large_additional=images/large/04098_01_LRG.jpg" target="_blank"><img src="images/04098_01.jpg" alt="" width="80" height="80" /><br /><span class="imgLinkAdditional">larger image</span></a></noscript></div>
    Issue 1
    Zoom fails to function and it does not work, when directory structure is as follow:
    Small images:
    images/Manufacturer_Name/ImageA.jpg
    images/ Manufacturer_Name /ImageA_01.jpg
    Medium images:
    images/medium/ Manufacturer_Name/ImageA_MED.jpg
    images/medium/ Manufacturer_Name/ImageA_01_MED.jpg
    Large images:
    images/large/ Manufacturer_Name/ImageA_LRG.jpg
    images/large/ Manufacturer_Name/ImageA_01_LRG.jpg

    html code view:
    <div class="additionalImages centeredContent back" style="width:50%;">
    <a class="bonzer" href="javascript:void(0);" rel="{gallery: 'product_info', smallimage: 'images/zcy/04098_01.jpg',largeimage: 'images/zcy/04098_01.jpg'}"><img src="images/zcy/04098_01.jpg" alt="" width="80" height="80" /></a>
    <noscript><a href="http://localhost/ZenDemo/index.php?main_page=popup_image_additional&amp;pID=2&amp;pic=0&amp;products_imag e_large_additional=images/zcy/04098_01.jpg" target="_blank"><img src="images/zcy/04098_01.jpg" alt="" width="80" height="80" /><br /><span class="imgLinkAdditional">larger image</span></a></noscript></div>
    With the above code:
    - I get the thumbnails
    - Image swap works
    - Once the thumbnail is selected, small image shows up in main product image area and when hover over it, small image is displayed.

    I am trying to figure out, what area of the code controls the output of the medium and large images above. And which part fails to add the proper directory path?

    Issue 2
    I have also found out, when I remove the comment from additional_images.php at around line 135
    //removed below for image swap and jquery zoom logic used from above instead
    $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;
    html code view:
    <a class="bonzer" href="javascript:void(0);" rel="{gallery: 'product_info', smallimage: 'images/zcy/04098_01.jpg',largeimage: 'images/large/zcy/04098_01_LRG.jpg'}"><img src="images/zcy/04098_01.jpg" alt="" width="80" height="80" /></a>
    <noscript><a href="http://localhost/ZenDemo/index.php?main_page=popup_image_additional&amp;pID=2&amp;pic=0&amp;products_imag e_large_additional=images/large/zcy/04098_01_LRG.jpg" target="_blank"><img src="images/zcy/04098_01.jpg" alt="" width="80" height="80" /><br /><span class="imgLinkAdditional">larger image</span></a></noscript></div>
    With the above code:
    - I get the thumbnails
    - Image swap works
    - Once the thumbnail is selected, small image shows up in main product image area and when hover over it, large image is displayed (zoom effect happens). Medium image DOES NOT show up.

    I would dump all images in one folder, but it would be horrible spaghetti and things will get messy with a lot of images!

    Thank you.
    Using Zen Cart 1.5.1

  5. #375
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    the $products_image_directory is defined further up in this file and actually this code has not been changed, so I can only assume that you are either organising your files in a way zen cart has never intended or there is a bug in the zencart core code?

    this is how it is defined:
    PHP Code:
    $products_image_directory str_replace($products_image''substr($products_imagestrrpos($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 you have this code above in your file. as you can see it gets the image directly from the image file location against your product.

    so assumably if on the database it is like this:
    images/coats/12345.jpg
    then the above code will strip this back to just
    images/coats/
    which defines the image directory. so there is no reason why this shouldnt be working.
    Phil Rogers
    A problem shared is a problem solved.

  6. #376
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    I think I see your problem


    images/Manufacturer_Name/ImageA.jpg
    images/ Manufacturer_Name /ImageA_01.jpg
    Medium images:
    images/medium/ Manufacturer_Name/ImageA_MED.jpg
    images/medium/ Manufacturer_Name/ImageA_01_MED.jpg
    Large images:
    images/large/ Manufacturer_Name/ImageA_LRG.jpg
    images/large/ Manufacturer_Name/ImageA_01_LRG.jpg
    should it not be:
    images/Manufacturer_Name/ImageA.jpg
    images/Manufacturer_Name/ImageA_01.jpg
    Medium images:
    images/Manufacturer_Name/medium/ImageA_MED.jpg
    images/Manufacturer_Name/medium/ImageA_01_MED.jpg
    Large images:
    images/Manufacturer_Name/large/ImageA_LRG.jpg
    images/Manufacturer_Name/large/ImageA_01_LRG.jpg

    ???
    Phil Rogers
    A problem shared is a problem solved.

  7. #377
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    From what I have found out so far, the problem is where DIR_WS_IMAGES is replaced with $products_image_directory!


    Quote Originally Posted by philip937 View Post
    the $products_image_directory is defined further up in this file and actually this code has not been changed, so I can only assume that you are either organising your files in a way zen cart has never intended or there is a bug in the zencart core code?

    this is how it is defined:
    PHP Code:
    $products_image_directory str_replace($products_image''substr($products_imagestrrpos($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 you have this code above in your file. as you can see it gets the image directly from the image file location against your product.

    so assumably if on the database it is like this:
    images/coats/12345.jpg
    then the above code will strip this back to just
    images/coats/
    which defines the image directory. so there is no reason why this shouldnt be working.


    The highlighted in Red is where the problem is. It should show it as images/medium/coats/ (for medium) or images/large/coats/ (for large) and it doesn't. That's why you get all your small images images/coats/ (Thumbnails) and non of the other, medium or large.

    Of-course this matters where you have your directories organized in a certain way, and not when placing all images under, images/, images/medium/ and images/large/.
    Using Zen Cart 1.5.1

  8. #378
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    Quote Originally Posted by philip937 View Post
    I think I see your problem




    should it not be:
    images/Manufacturer_Name/ImageA.jpg
    images/Manufacturer_Name/ImageA_01.jpg
    Medium images:
    images/Manufacturer_Name/medium/ImageA_MED.jpg
    images/Manufacturer_Name/medium/ImageA_01_MED.jpg
    Large images:
    images/Manufacturer_Name/large/ImageA_LRG.jpg
    images/Manufacturer_Name/large/ImageA_01_LRG.jpg

    ???
    It should be:
    images/Manufacturer_Name/ImageA.jpg
    images/Manufacturer_Name/ImageA_01.jpg
    Medium images:
    images/medium/Manufacturer_Name/ImageA_MED.jpg
    images/medium/Manufacturer_Name/ImageA_01_MED.jpg
    Large images:
    images/large/Manufacturer_Name/ImageA_LRG.jpg
    images/large/Manufacturer_Name/ImageA_01_LRG.jpg

    I am trying to get rid of all $products_image_directory and replace it back to DIR_WS_IMAGES as it was (I think originally intended). I will let you know what happens.
    Last edited by Kevin205; 2 May 2013 at 05:25 PM.
    Using Zen Cart 1.5.1

  9. #379
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    I think your missing the point. If you replace with DIR_WS_IMAGES this will set the directory as /images only and will not use your specified folders.
    If you want different folders then you need to use the structure I stated above .

    Small
    images/your_sub
    Medium
    images/your_sub/medium
    Large
    images/your_sub/large

  10. #380
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Jquery Zoom [Support thread]

    How do you make the main image to center horizontally in the product_info page?

    I've looked at every css page that's out there!
    Using Zen Cart 1.5.1

 

 
Page 38 of 39 FirstFirst ... 2836373839 LastLast

Similar Threads

  1. v153 jQuery Scrolling Sideboxes [Support Thread]
    By lat9 in forum Addon Sideboxes
    Replies: 79
    Last Post: 15 Apr 2024, 10:20 PM
  2. v152 Down for Maintenance jQuery Countdown (Support Thread)
    By rbarbour in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 27 Nov 2015, 03:04 PM
  3. v152 jQuery Banners (Support Thread)
    By rbarbour in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 30 Sep 2015, 02:07 AM
  4. Jquery Lightbox [Support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 257
    Last Post: 2 Aug 2012, 10:57 PM
  5. Is there an add-on combine the functions of AJAX_image_swapper and Jquery Zoom?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Jul 2010, 01:57 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