Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Resize Dimension of Product Additional Images Independently of the Centred Content?

    Does anyone know if there's a way to resize the images in the centred content areas (new products, all products and specials) without the changes taking effect on the additional images?

    At present, when I resize the thumbnails in admin/images/Small Image Width, the centred content changes as desired, but unfortunately, this also effects the product Additional Images.

    How can I resize dimensions on the product Additional Images independently of the centred content images?

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Here is a tutorial which does exactly what I need, but it's not for ZenCart:

    http://www.######################/tips-and-trick...product-thumbs

    How would I adapt the above tutorial for Zen Cart? This would be very useful for everyone.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Perhaps I could size the additional images by hard coding /includes/modules/custom/additional_images.php

    I can see the following code:

    $thumb_slashes = zen_image($base_image, addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);

    Is there some way to edit that code so that it would define the small image width and small image height in pixels?

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    When I change this:

    $thumb_slashes = zen_image($base_image, addslashes($products_name), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);

    to this:

    $thumb_slashes = zen_image($base_image, addslashes($products_name));

    ......... it definitely makes the product additional images stop sizing with the centred content images. Therefore, if I could figure out the proper PHP code for this, then I'd be laughing:

    $thumb_slashes = zen_image($base_image, addslashes($products_name), 125px, 188px);

    I've never been good with PHP. Can anyone tell me how to write that properly please?

  5. #5
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Put the code in your stylesheet.css like so:

    Code:
    .new_products img {
      height: 100px; 
      width: 50px;
    }
    
    .all_products img {
      height: 100px; 
      width: 50px;
    }
    
    .specialsListBoxContents img {
      height: 100px; 
      width: 50px;
    }
    Hope this helps.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  6. #6
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    OK, sussed it out.... here's the solution:

    $thumb_slashes = zen_image($base_image, addslashes($products_name), $width=125, $height=188);

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Get em Fast, I never seen your reply but I feel stupid now since it's so simple :)

  8. #8
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Ah, on second thoughts that doesn't work. Changing the size in CSS is just stretching the image and making it pixelated.

  9. #9
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Hmmmm......looked good on my end.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  10. #10
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Resize Dimension of Product Additional Images Independently of the Centred Conten

    Quote Originally Posted by Get Em Fast View Post
    Hmmmm......looked good on my end.
    Probably looked good because I'd already resized the images via admin/config/images... which resizes by generating the image in the desired dimension. Stretching in CSS looked pretty awful as it was pixelated.

    I've fixed it now though... www.silkblooms.co.uk if you wanna look.

    I just hard coded the additional_images.php file to override the SMALL_IMAGE_WIDTH. Looks good now.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Main Page content not centred
    By kahli08 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 Jul 2011, 04:43 AM
  2. How to resize additional images into medium?
    By lina0962 in forum General Questions
    Replies: 0
    Last Post: 31 May 2010, 05:43 PM
  3. How to align the main and additional product images in the listing?
    By mishutkadesign in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 17 Jul 2008, 02:49 PM
  4. How do i Resize the additional images?
    By dwarfs8 in forum Basic Configuration
    Replies: 4
    Last Post: 2 Feb 2007, 05:03 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