Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34
  1. #11
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    SWEET! haha after all that all that had to be changed was that! perfect thanks mate. Im surprised that this isn't controllable from the admin!
    Phil Rogers
    A problem shared is a problem solved.

  2. #12
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    The only issue with the code change is if there are no additional images, it will put 3 'Image Not found' images.

  3. #13
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    Quote Originally Posted by philip937 View Post
    SWEET! haha after all that all that had to be changed was that! perfect thanks mate. Im surprised that this isn't controllable from the admin!
    Well in theory, if you only want 3 additional images, just don't upload the other 7 :)

  4. #14
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    hmm yeah i do have some that have none. so thats a problem.

    How can I test if there is no images in the array?

    tied this but doesnt work..

    if ($num_images < 1) {
    $num_images = sizeof($images_array);
    } else {
    // Build output based on images found
    $num_images = 3;
    }
    Phil Rogers
    A problem shared is a problem solved.

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

    Default Re: Limit additional images listed?

    haha was having a brian fart.

    this is the fix

    if ($num_images < 3) {
    $num_images = sizeof($images_array);
    } else {
    // Build output based on images found
    $num_images = 3;
    }
    Phil Rogers
    A problem shared is a problem solved.

  6. #16
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    Quote Originally Posted by philip937 View Post
    haha was having a brian fart.

    this is the fix

    if ($num_images < 3) {
    $num_images = sizeof($images_array);
    } else {
    // Build output based on images found
    $num_images = 3;
    }
    Wont that also not show any additional images for products that only have 2?

  7. #17
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    no the logic is

    if the number of images in the array is less than 3 then do what it normally does, i.e $num_images = sizeof($images_array); other wise if there are 4 or more excecute the mod that you said which instead of building based on the actual number of images, it only buoilds up to 3.

    make sense? works a treat anyway :)

    Thanks for you help dgent
    Phil Rogers
    A problem shared is a problem solved.

  8. #18
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    Ah yes of course I didnt read it properly.

  9. #19
    Join Date
    Jun 2012
    Posts
    94
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    Philip937,

    I am happy to hear you found the solutions for this! Can you please show me exactly where you added this code in includes/modules/additional_images.php? Or if you removed anything? Thank you!

  10. #20
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Limit additional images listed?

    Quote Originally Posted by WWRepair View Post
    Philip937,

    I am happy to hear you found the solutions for this! Can you please show me exactly where you added this code in includes/modules/additional_images.php? Or if you removed anything? Thank you!
    cant remeber off the top of my head but I think I just added this code either after where $num_images is defined

    so basically what its doing is saying if there is less than 3 images then the amount of images should be default i.e sizeof($image_array)

    PHP Code:
    if ($num_images 3) {
    $num_images sizeof($images_array);

    otherwise lets fool it into thinking that there are only a max of 3..

    PHP Code:
     else {
    // Build output based on images found
    $num_images 3;

    so full code would be:
    PHP Code:
    if ($num_images 3) {
    $num_images sizeof($images_array);
    }else {
    // Build output based on images found
    $num_images 3;

    hope this helps, if you get stuck let me know any I will pull more code from my file I modified. what version are you using also, just incase the code has been changed from the version I was playing with!
    Phil Rogers
    A problem shared is a problem solved.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 5 Sep 2014, 03:28 AM
  2. Is there an Easy way to limit additional Images PER PAGE?
    By NadiaUSA in forum General Questions
    Replies: 7
    Last Post: 29 Jul 2011, 06:57 PM
  3. Layout of Additional of Additional Product Images - Possible Bug?
    By RatMonkey in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Mar 2011, 02:21 PM
  4. Replies: 14
    Last Post: 11 Dec 2009, 07:34 PM
  5. Additional Large Images WITHOUT additional Thumbnails
    By haasPlay in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Sep 2006, 04:54 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