osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Admin Page - Product Edit Image Display size?

This is a discussion on Admin Page - Product Edit Image Display size? within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; So I started with a simple OSC max 2.0 setup. Used the mopics and got that installed working just ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 02-11-2007, 07:29 PM
New Member
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
xpman is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 02-14-2007, 08:12 PM
New Member
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
xpman is on a distinguished road
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to xpman For This Useful Post:
altenter (06-09-2008), typhus (06-04-2008)
  #3  
Old 02-14-2007, 09:30 PM
Member
 
Join Date: Dec 2006
Posts: 74
Thanks: 11
Thanked 13 Times in 4 Posts
Rep Power: 2
Mushroom will become famous soon enough
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.
__________________
Now, If I only knew what I was doing!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 02-14-2007, 10:36 PM
New Member
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
xpman is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 02-27-2007, 07:46 PM
Member
 
Join Date: Dec 2006
Posts: 74
Thanks: 11
Thanked 13 Times in 4 Posts
Rep Power: 2
Mushroom will become famous soon enough
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.
__________________
Now, If I only knew what I was doing!

Last edited by Mushroom; 02-27-2007 at 07:49 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 02-28-2007, 01:27 PM
New Member
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
xpman is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 02-28-2007, 01:28 PM
New Member
 
Join Date: Apr 2006
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Rep Power: 0
xpman is on a distinguished road
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 && --> ||
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 02-28-2007, 01:38 PM
Member
 
Join Date: Dec 2006
Posts: 74
Thanks: 11
Thanked 13 Times in 4 Posts
Rep Power: 2
Mushroom will become famous soon enough
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.
__________________
Now, If I only knew what I was doing!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 02-28-2007, 01:39 PM
Member
 
Join Date: Dec 2006
Posts: 74
Thanks: 11
Thanked 13 Times in 4 Posts
Rep Power: 2
Mushroom will become famous soon enough
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!
__________________
Now, If I only knew what I was doing!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 06-04-2008, 09:46 AM
typhus's Avatar
osCMax Testing Team
 
Join Date: Aug 2005
Location: Midlands, UK
Posts: 22
Thanks: 15
Thanked 4 Times in 3 Posts
Rep Power: 0
typhus is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 10:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax