Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 10 of 10

Thread: Admin Page - Product Edit Image Display size?

  1. #1
    xpman
    Guest


    Default Admin Page - Product Edit Image Display size?

    So I started with a simple OSC max 2.0 setup. Used the mopics and got that installed working just fine. I did not like how in the admin section when editing products the picture is the full size. It appears there is no constraint on the picture via the IMAGE_HEIGHT...variables (Like small,header) etc..

    So my picture is HUGE in that display. However, on my customer viewable sections everything looks fine, and it shrinks the photo down to thumbnail size then click to enlarge is there if i want to see the full size. How can I get that functionality into the admin section? (Click to enlarge).

    I just installed ImagicMagick tonight and it works great as far as creating thumbnails on the fly and writing to disk. However, this did not help with my admin section either.

    Any ideas would be appreciated. I'm fairly certain there is a line somewhere in catalog/admin/categories.php that has the image size however it's a very large file and having trouble where/what I can edit to get this working.

    Thanks in advance.

    -PK

  2. #2
    xpman
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Ok after way too much code searching and debuging I think I found my problem. Don't know if this is a bug or not cuz I have so many contribs but...I went back and looked at the default oscmax code and looks like this is broke.

    If you look at the function tep_image in :

    /catalog/admin/includes/functions/html_output.php (search for 'tep_image')

    you will find something like this:
    PHP Code:
    // The HTML image wrapper function
    // LINE CHNAGED: MS2 update 501112 - changed 'params' to 'parameters'
      
    function tep_image($src$alt ''$width ''$height ''$parameters '') {
    // BOF: MS2 update 501112-Added all 'tep_not_null()'
        
    $image '<img src="' tep_output_string($src) . '" border="0" alt="' tep_output_string($alt) . '"';

        if (
    tep_not_null($alt)) {
          
    $image .= ' title=" ' tep_output_string($alt) . ' "';
        }

        if (
    tep_not_null($width) && tep_not_null($height)) {
          
    $image .= ' width="' tep_output_string($width) . '" height="' tep_output_string($height) . '"';
        }

        if (
    tep_not_null($parameters)) $image .= ' ' $parameters;

    // EOF: MS2 update 501112
        
    $image .= '>';

        return 
    $image;
      } 

    I believe the if statement " if (tep_not_null($width) && tep_not_null($height))" should eb a OR like this:

    if (tep_not_null($width) || tep_not_null($height))

    Seeing how pretty much everything you find says never to input the height and the width and the tep_not_null returns true only when there is a value, if you only fill in the height or the width then this is going to come out as a FALSE which in turns causes the width and height to not be displayed in the <IMG> tag for the image.


    Anyhow, I'm using ImageMagic on the man part of my site os this function is pretty much replaced. However, for the admin it's a problem. Changing the and to a OR has fixed my issue. Just thought I would mention this as maybe it's a bug that needs to be fix or at least the documents need to be updated to say you must have height as 0 if width is set or width as 0 if height is set etc...

  3. #3
    Mushroom
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Although I haven't installed image magic. Changing the and to or just got me a single thin line for a picture.
    One of my source files is 908x855 and it displays every gory pixel of it in admin, and the smallest thumbnail in the customer side.

  4. #4
    xpman
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    What do you have your "Small Image Height" and Small Image Width" set to in the configuration -> Images under the admin section?

    Try only setting the height and leave the other blank. Or versa

  5. #5
    Mushroom
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Just Small Image Height is set to 100 pixels, SI Width is blank and calculate to True.

    It's got to be something unique to admin.
    Last edited by Mushroom; 02-27-2007 at 07:49 PM.

  6. #6
    xpman
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Did you apply the fix I mentioned above. Provided you only have height or width filled in then you probably just had the same problem with the AND statement I showed above. Just change the AND (&&) to a OR (||) and see if it fixes your admin page.

  7. #7
    xpman
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Just to be totally clear. The line in the html_output file reference above:

    if (tep_not_null($width) && tep_not_null($height))


    SHOULD be

    if (tep_not_null($width) || tep_not_null($height))

    notice the only change is the && --> ||

  8. #8
    Mushroom
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    As I mentioned in my first post, I did try it. And no, it still didn't help me. Remember I am using RC3. Who knows where else bugs may be hiding.

  9. #9
    Mushroom
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    That is correct, it happens to be line 75 in my file. Don't worry too much about it, I'm happy it is working for you!

  10. #10
    typhus
    Guest


    Default Re: Admin Page - Product Edit Image Display size?

    Thanks for that fix, it worked for me.

    And if anyone knows of a similar fix the the thumbs that appear on the 'cross sell' page please let us know.

    Thanks, J.

Similar Threads

  1. Image size hack for product pages
    By brendanl79 in forum osCmax v2 Customization/Mods
    Replies: 10
    Last Post: 06-15-2007, 01:37 PM
  2. Which page do I edit for results of product display
    By countingsheep in forum osCmax v2 Customization/Mods
    Replies: 6
    Last Post: 06-29-2006, 05:52 PM
  3. How to change the image size on product page?
    By groggory in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 02-08-2006, 07:06 PM
  4. Set Product Page Image Size
    By groggory in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 01-22-2006, 04:52 PM
  5. Clicking product image to view larger size
    By twinklep in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 09-07-2004, 06:35 AM

Bookmarks

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
  •