Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008
    Location
    USA
    Posts
    560
    Plugin Contributions
    0

    Default Making images the same size without messing them up

    Hello again,

    I have a problem with images that have been downloaded. I would like them to be a uniform size so they are more easy on the customers eyes. I hope I am explaining this right. This is one of my categories that I am talking about:

    http://www.petluxuryboutique.com/ind...dex&cPath=1319


    Thanks,

    Silver

  2. #2
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    109
    Plugin Contributions
    0

    Default Re: Making images the same size without messing them up

    Your best bet would be to resize your images then upload them. If you simply change the image sizes in admin it may squish or distort some images. Hope that helps a little.

  3. #3

    Default Re: Making images the same size without messing them up

    Hi,
    I had the same problem with my website, even though i resized the images i couldn't get the product names to line up right. I got round it by putting a div box around the images which would then make all the images line up even if they aren't the same size:
    http://www.drgreens.co.uk/Grow-Room-Tools/Miscellaneous

    You have to modify includes/modules/YOURTEMPLATE/product_listing.php
    find this part
    PHP Code:
    case 'PRODUCT_LIST_QUANTITY':

            
    $lc_align 'right';

            
    $lc_text $listing->fields['products_quantity'];

            break;

            case 
    'PRODUCT_LIST_WEIGHT':

            
    $lc_align 'right';

            
    $lc_text $listing->fields['products_weight'];

            break;

            case 
    'PRODUCT_LIST_IMAGE':

            
    $lc_align 'center';

            if (
    $listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {

              
    $lc_text '';

            } else {

              if (isset(
    $_GET['manufacturers_id'])) {

                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';

              } else {

                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'
    and change to:

    PHP Code:
    case 'PRODUCT_LIST_QUANTITY':
            
    $lc_align 'right';
            
    $lc_text $listing->fields['products_quantity'];
            break;
            case 
    'PRODUCT_LIST_WEIGHT':
            
    $lc_align 'right';
            
    $lc_text $listing->fields['products_weight'];
            break;
            case 
    'PRODUCT_LIST_IMAGE':
            
    $lc_align 'center';
            if (
    $listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
              
    $lc_text '';
            } else {
              if (isset(
    $_GET['manufacturers_id'])) {
                
    $lc_text '<div id="listingPImage">'.'<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'.'</div>';
              } else {
                
    $lc_text '<div id="listingPImage">'.'<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'.'</div>'
    You can then style listingPimage in your stylesheet to be the size and height that you would like it

  4. #4
    Join Date
    Mar 2008
    Location
    USA
    Posts
    560
    Plugin Contributions
    0

    Default Re: Making images the same size without messing them up

    kitten091182:

    Thanks for the explicit detail.

    Regards,

    Silver

  5. #5
    Join Date
    May 2007
    Location
    Montebello, CA
    Posts
    40
    Plugin Contributions
    0

    Default Re: Making images the same size without messing them up

    I use this and it works thank you.


    Quote Originally Posted by kitten091182 View Post
    Hi,
    I had the same problem with my website, even though i resized the images i couldn't get the product names to line up right. I got round it by putting a div box around the images which would then make all the images line up even if they aren't the same size:
    http://www.drgreens.co.uk/Grow-Room-Tools/Miscellaneous

    You have to modify includes/modules/YOURTEMPLATE/product_listing.php
    find this part
    PHP Code:
    case 'PRODUCT_LIST_QUANTITY':

            
    $lc_align 'right';

            
    $lc_text $listing->fields['products_quantity'];

            break;

            case 
    'PRODUCT_LIST_WEIGHT':

            
    $lc_align 'right';

            
    $lc_text $listing->fields['products_weight'];

            break;

            case 
    'PRODUCT_LIST_IMAGE':

            
    $lc_align 'center';

            if (
    $listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {

              
    $lc_text '';

            } else {

              if (isset(
    $_GET['manufacturers_id'])) {

                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>';

              } else {

                
    $lc_text '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'
    and change to:

    PHP Code:
    case 'PRODUCT_LIST_QUANTITY':
            
    $lc_align 'right';
            
    $lc_text $listing->fields['products_quantity'];
            break;
            case 
    'PRODUCT_LIST_WEIGHT':
            
    $lc_align 'right';
            
    $lc_text $listing->fields['products_weight'];
            break;
            case 
    'PRODUCT_LIST_IMAGE':
            
    $lc_align 'center';
            if (
    $listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
              
    $lc_text '';
            } else {
              if (isset(
    $_GET['manufacturers_id'])) {
                
    $lc_text '<div id="listingPImage">'.'<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'.'</div>';
              } else {
                
    $lc_text '<div id="listingPImage">'.'<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTHIMAGE_PRODUCT_LISTING_HEIGHT'class="listingProductImage"') . '</a>'.'</div>'
    You can then style listingPimage in your stylesheet to be the size and height that you would like it
    https://www.tni-wireless.com

    Zen Cart V1.5.4 with Tableau Responsive Theme.

 

 

Similar Threads

  1. Images::: resizing to the same size
    By PinkLeopard in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Aug 2010, 07:10 AM
  2. Making subcategory images all the same size?
    By RobM in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 20 Jan 2009, 02:52 PM
  3. Replies: 0
    Last Post: 12 Nov 2008, 10:08 PM
  4. Making images all the same size on the home page
    By Trish in forum General Questions
    Replies: 4
    Last Post: 30 Sep 2008, 07:03 PM
  5. Replies: 13
    Last Post: 24 Oct 2007, 03:16 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