Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HUGE Pics in Admin section


digilexic

Recommended Posts

When I am in admin looking at products, the images are full size to the right of the list. Seems like they should be smaller. Right now its hard to view the list because big pictures of categories and products take up the screen. I looked at /catalog/admin/categories.php but it looks like it is asking for SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT . Is there a chance these arent getting passed to the admin script? And how can I make that happen?

Link to comment
Share on other sites

The pisture is displayed around 1300 with, if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($pInfo->products_date_available));

$contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);

 

So those should limit it, but have you set a value for at least one of those in admin?

 

You don't want pics too big, slows down load times.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

The pisture is displayed around 1300 with, if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($pInfo->products_date_available));

$contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);

 

So those should limit it, but have you set a value for at least one of those in admin?

 

You don't want pics too big, slows down load times.

 

My line looks EXACTLY like that, but the pics are still shown full size (500px wide)

 

I understand WHERE it is...the problem is that it is not using the numbers setup in the ADMIN section...the numbers work fine in the catalog, just not in Administration.... looks like those variables aren't populated? or something is missing from the required variables?

 

I have also noted that it does not work on the preview screen either. Same big pic, even though the variables are listed in the script. Its like they have no values...

Link to comment
Share on other sites

To check what those variable actually hold, add this coe to the page

 

$to = 'SMALL_IMAGE_WIDTH=' .SMALL_IMAGE_WIDTH.'SMALL_IMAGE_HEIGHT='.SMALL_IMAGE_HEIGHT ; print "<script>alert('$to');</script>";

 

That will give an alert with values, it may also create a header already sent error, so do`nt leave it there.

 

You could install Total Configuration http://addons.oscommerce.com/info/5040

That gives you full control over all setting, allows you to add new ones & shows some that are 'hidden' by default.

Its a quick easy install.

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

To check what those variable actually hold, add this coe to the page

 

$to = 'SMALL_IMAGE_WIDTH=' .SMALL_IMAGE_WIDTH.'SMALL_IMAGE_HEIGHT='.SMALL_IMAGE_HEIGHT ; print "<script>alert('$to');</script>";

 

That will give an alert with values, it may also create a header already sent error, so do`nt leave it there.

 

You could install Total Configuration http://addons.oscommerce.com/info/5040

That gives you full control over all setting, allows you to add new ones & shows some that are 'hidden' by default.

Its a quick easy install.

 

;)

 

Ok the values are there, apparently they are not being transferred to the $content[] array. And I don't know how to check it. matter of fact I thinjk the function tep_info_image may be the problem. If I use tep_image, the picture doesn't show, but the size is correct...

Link to comment
Share on other sites

Ok the values are there, apparently they are not being transferred to the $content[] array. And I don't know how to check it. matter of fact I thinjk the function tep_info_image may be the problem. If I use tep_image, the picture doesn't show, but the size is correct...

 

Okay...looks like the problem may be with tep_info_image, it makes a call to tep_image, and it looks like perhaps the variable value is being lost somewhere in the mix. Looks like admin is the only place that uses tep_info_image and it only appears in 2 places in the categories.php file the function can be found in /catalog/admin/includes/functions/general.php

 

So what I think is that the variable is getting dropped between the call to tep_info_image and tep_image which is in the file /catalog/admin/includes/functions/html_output.php

 

I think I have figured out that much, but what to do with it, I have no clue.

Link to comment
Share on other sites

Okay, I think I figured out the problem...in order for images on my site to work with the correct aspect ratio, I removed the height values in the configuration. This BREAKS the admin side for resizing pictures since the tep_image function is different than the one that is used for the catalog. It does not allow for a null width or height.

 

The one used for the catalog has this function, however I am not sure how to make it work in the admin side of the script. ANyone have a solution?

 

BTW this only affects products in the list and for product previews. If it is a category, it will show the image full size.

Link to comment
Share on other sites

  • 4 months later...

Hi there,

 

Do you ever find a solution for this? I have exactly the same problem and it is driving me very quietly around the twist. (At least it will until five, and then I'm having a beer) :)

 

I've been attempting to jump in and intercept the images and resize them...but they insist on being huge.

 

Cheers

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...