Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 48
  1. #21
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    // check for a medium image else use small
    $products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
    if (file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
    $base_image = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
    }
    $thumb_slashes = zen_image($base_image, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);
    $thumb_regular = zen_image($base_image, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);

    I used to code years ago working with 8bit machines...so I tried reading this...cuz I have NO real experience with PHP....

    and I found what I thought was an issue (in green).

    So I changed it to read:

    // check for a medium image else use small
    $products_image_medium = $products_image_base . $products_image_extension . IMAGE_SUFFIX_MEDIUM ;
    if (file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
    $base_image = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
    }
    $thumb_slashes = zen_image($base_image, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);
    $thumb_regular = zen_image($base_image, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);

    and now it works!!!!!!!!!


    Hooray!!!!!!!!!!!!
    = )

    Thanks Dr. Byte!!!
    Last edited by Donn; 16 Oct 2007 at 09:12 PM.

  2. #22
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    I didn't fix the problem after all.......

    lol

    I used test images with the same color background as the background of the page...and only marked them with a "1" and "2" corresponding to additional images '1' and '2'.....

    So I thought the additional images were displaying MEDIUM files, but........I went out and came back to working on this.............and it seems that I didn't realize the numerals were written so big. lol They were just my thumbnail-sized photos displaying as the additional photos.

    So...

    I haven't solved anything.

    Anyone reading this who knows what I can do to correct this issue, please let me know.

    Thank you...

    PS --I thought 'Image Suffix Medium' in uppercase meant it was a constant....
    meaning it referred to whatever medium-sized files are set to be called in admin.

    So I thought that '$products_image_extension' referred to the additional part of the
    string that comprises a photo file's name if it is an additional image. (eg 01, 02, whatever)

    So....that's why I thought it was reversed. Still confused!!!!!!!!!!!!
    Last edited by Donn; 16 Oct 2007 at 11:30 PM.

  3. #23
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    I *STILL* can't seem to get MEDIUM photos to display as additionals.

    I read the additional photos PHP file, and I see that I was way off in the change that I made. I read the *WHOLE* file this time, and I realize that I was clueless. Now Im a little less clueless, but not much.

    But still cant figure out whats up.....................!!

    Any ideas would be GREAT..........!

    thank u kindly!

  4. #24
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    Quote Originally Posted by Donn View Post
    I *STILL* can't seem to get MEDIUM photos to display as additionals.

    I read the additional photos PHP file, and I see that I was way off in the change that I made. I read the *WHOLE* file this time, and I realize that I was clueless. Now Im a little less clueless, but not much.

    But still cant figure out whats up.....................!!

    Any ideas would be GREAT..........!

    thank u kindly!
    UPDATE.........still no success with this.



    To rehash it briefly:

    I need the additional photos to display as MEDIUM instead of the default thumbnail size.

    The script provided above in this thread by Dr. Byte doesn't work for some reason.

    The additional photos display in MEDIUM size....OK.........

    But they are ALL simply IMAGE_LRG and not the IMAGE_LRG_XX array of additional photos.

    If I click for larger photo, tho, it WILL dispaly the correct LARGE photos........

    Again.........I DO need help....Im stuck......

    Thank you all for the help so far....this is making ZC a GREAT experience...I dont have the background to figure this all out on my own.

    I DO have a desire to learn, tho..........

  5. #25
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Multiple Images for One Listing Questions

    Not directly in the stream of your work, but you have noted directories like /IMAGES/MEDIUM/ (in caps)... the stock directories are all lowercase. Could this have anything to do with the weirdness? Or was it just a device to show organization in your post?

  6. #26
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Multiple Images for One Listing Questions

    The
    // Check for additional matching images
    block starting at line 39 does look for additional images in the base folder for the product, so you certainly would need to have files in that location in order for ZC to know to use the ones in /medium/. That's some very deep code in there, and I can't take time now to decipher it all. I guess the relevant question is, how does the code snippet referenced in posts above know to operate on the right base name... I'll have to look at that in depth later.


    Another point - did you ever get the stock additional images function to work properly? Make sure you are doing that right before you introduce other variables like individual product/category subdirectories or making the additional images use the medium file instead of the small file.
    Last edited by gjh42; 18 Oct 2007 at 06:29 PM.

  7. #27
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    Quote Originally Posted by gjh42 View Post
    Not directly in the stream of your work, but you have noted directories like /IMAGES/MEDIUM/ (in caps)... the stock directories are all lowercase. Could this have anything to do with the weirdness? Or was it just a device to show organization in your post?
    ##############################___
    Glenn
    Glenn---

    Thans for the comment. I was actually just using ALL CAPS as I sometimes do in psots. I realize that this is poor practice, and just adds confusion to the issue. So the files ARE in the default folders, with the lower-case names.

    Quote Originally Posted by gjh42 View Post
    The
    // Check for additional matching images
    block starting at line 39 does look for additional images in the base folder for the product, so you certainly would need to have files in that location in order for ZC to know to use the ones in /medium/.
    I've experimented, and taking the base files out always keeps the corresponding additionals from displaying.

    Quote Originally Posted by gjh42 View Post
    That's some very deep code in there, and I can't take time now to decipher it all. I guess the relevant question is, how does the code snippet referenced in posts above know to operate on the right base name... I'll have to look at that in depth later.
    It seems that the base name is correct for the additional images....but the array component of the filename (_01, _02, etc) is missing or something. As I said, additionals will display at MED size, but the BASEFILE will be displayed in place of the correct additional image.

    So that leads me to think that whatever part of the script is outputting the image name is completely missing the array part. What is the 'array component' string of the additional image file name called? (sorry, Im using my wn terminology here)


    Quote Originally Posted by gjh42 View Post
    Another point - did you ever get the stock additional images function to work properly? Make sure you are doing that right before you introduce other variables like individual product/category subdirectories or
    So it CAN be done? Im guesing I dont have to leave all my images in /images/, /large/, and /medium/ root dirs. I noticed the demo cart had subdirs. Any rules for this???


    Quote Originally Posted by gjh42 View Post
    making the additional images use the medium file instead of the small file.
    The stock additional images works perfectly, displaying the additionals as thumbnail-sized photos.

    So that crosses a few possibilities off the list.........

    THANKS AGAIN 4 the feedback!!
    Last edited by Donn; 18 Oct 2007 at 10:27 PM.

  8. #28
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Multiple Images for One Listing Questions

    You may have already looked at this tutorial: How do I add multiple images to a product?, but study it again carefully. It has the answers to most of your questions, asked and unasked, about image files and product/category subdirectories.

    The medium additional images are another issue. I had the feeling the base name was not getting the full additional image filename... will check into that more when I have time.
    Last edited by gjh42; 19 Oct 2007 at 05:42 AM.

  9. #29
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    Quote Originally Posted by gjh42 View Post
    You may have already looked at this tutorial: How do I add multiple images to a product?, but study it again carefully. It has the answers to most of your questions, asked and unasked, about image files and product/category subdirectories.

    The medium additional images are another issue. I had the feeling the base name was not getting the full additional image filename... will check into that more when I have time.
    I've been away........

    Enthused to approach this freshly, tho...


    OK, to review:

    Multiple images display perfectly, with clickable tumbnails.

    But when I want the MEDIUM-sized ones, I run into problems.

    The changes made in the PHP file somehow do not work. I cannot figure out WHY, but they don't.

    MEDIUM additional files are displayed, but they are just the base image, and not the base image_01, _02, etc. It's that one image in the product description repeated again and again beneath the image description.

    But...the link to click for larger DOES take me to the correct larger images.

    So for now Im setting it back to default thumbnail additionals.



    Thats about all I can think of.

    Anyone with any ideas, please consider contributing....

    Anything would be helpful.........

  10. #30
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Multiple Images for One Listing Questions

    OK....So this is what I have established, or at least i *THINK* I have...lol

    // check for a medium image else use small
    $products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
    if (file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
    $base_image = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
    }


    This MUST be the offending code. Why? Because without the changes here and below, additonals display fine (as small thumbs). With these changes, I get all medium addtls, but the WRONG filenames. And this is the part that checks for the files, and then asssigns the correct filename to the images that will be the additoinals displayed. This is what is not working. Are these the correct strings? Correct syntax??

    The BASE filename is used. But---not the array part (_01, _02, etc.) or the MED part. The addttnls are just small -sized images displayed at MED size.




    $thumb_slashes = zen_image($base_image, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);
    $thumb_regular = zen_image($base_image, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT);


    Since the additionals are displaying MED size, it seems this change to the PHP file is fine.
    Last edited by Donn; 23 Oct 2007 at 02:51 AM.

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. How can I add multiple images for ONE product through the Admin page?
    By stevewag in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Apr 2009, 09:57 AM
  2. Multiple images for one item ? ? ?
    By ve39 in forum General Questions
    Replies: 7
    Last Post: 22 Oct 2008, 06:56 AM
  3. Questions about emailing multiple customers at one time
    By BouncerFL in forum General Questions
    Replies: 0
    Last Post: 1 Apr 2008, 05:57 PM
  4. Multiple Images Questions
    By manifest in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 3 Mar 2008, 10:44 PM
  5. Stock control - listing multiple items as one
    By chmac in forum General Questions
    Replies: 3
    Last Post: 10 Sep 2007, 01:51 PM

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