Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Image


mtechama

Recommended Posts

my images still didn't came out when redo my picture size

 

Some of it is: Square, Rectangular like (long and flat) and (Tall And skinny)

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

What is the "actual" size of the picture in your post?

 

Kevin

"What I didn't know yesterday, I know today & will remember tomorrow"

(By Kwalker)

 

What do you see when you open up the tep_database-pr2.2-CVS.pdf file that came with your osCommerce download?

Link to comment
Share on other sites

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

I would replace the image with another image that displays ok, and see what happens.

"What I didn't know yesterday, I know today & will remember tomorrow"

(By Kwalker)

 

What do you see when you open up the tep_database-pr2.2-CVS.pdf file that came with your osCommerce download?

Link to comment
Share on other sites

When I put this code in on (catalog)/includes/funtions/html_output.php

 

////
// The HTML image wrapper function
// modified: Eric Covert, 2005
// version: 1.2
/* 
Modified to allow calls to this function to determine whether or not to allow images to stretch. Original modification was designed to force images to maintain their aspect ratio when being resized. Subsequent modifications include changing the default of the stretch variable to "false" and making smaller images not expand. Thus, if an images dimensions are both smaller than the passed in width and height variables, the original dimensions will be used.
*/
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $stretch='false') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$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 ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') )
	{
		if ($image_size = @getimagesize($src))
		{
			if (empty($width) && tep_not_null($height))
			{
				if (($image_size[1] < $height) && ($stretch=='false'))
				{
					// EC - if width hasn't been passed in, the image height is smaller than the setting, and stretch is false, use original dimensions
					$width=$image_size[0];
					$height=$image_size[1];
				}
				else
				{
					// EC - if width hasn't been passed, and the image height is larger than the setting, height ends up as the setting and width is modified to suit
				  $ratio = $height / $image_size[1];
				  $width = $image_size[0] * $ratio;
				}
			}
			elseif (tep_not_null($width) && empty($height))
			{
					// EC - if height hasn't been passed in, the image width is smaller than the setting, and stretch is false, use original dimensions
				if (($image_size[0] < $width) && ($stretch=='false'))
				{
					$width=$image_size[0];
					$height=$image_size[1];
				}
				else
				{
					// EC - if height hasn't been passed, and the image width is larger than the setting, width ends up as the setting and height is modified to suit
				  $ratio = $width / $image_size[0];
				  $height = $image_size[1] * $ratio;
				}
			}
			elseif (empty($width) && empty($height))
			{
				// EC - if neither height nor width are passed in, just use the original dimensions
			  $width = $image_size[0];
			  $height = $image_size[1];
			}
			//EC - added the following elseif for calculating based on stretch/no-stretch
			elseif (tep_not_null($width) && tep_not_null($height))
			{
				if ((($image_size[0] > $width) || ($image_size[1] > $height)) && ($stretch=='false'))
				{
					// EC - if width and height are both passed in, either original height or width are larger than the setting, and stretch is false, resize both dimensions to suit
					$new_ratio=$height / $width;
					$image_ratio=$image_size[1] / $image_size[0];
					if ($new_ratio >= $image_ratio)
					{
						$height=$image_size[1]*($width/$image_size[0]);
					}
					else
					{
						$width=$image_size[0]*($height/$image_size[1]);
					}
				}
				elseif ($stretch=='false')
				{
					// EC - if we got here, both width and height have been passed in, both original height and width are smaller than setting, and stretch is set to false. So just use original dimensions.
					$width=$image_size[0];
					$height=$image_size[1];
				}
			}
		}
		elseif (IMAGE_REQUIRED == 'false')
		{
			return false;
		}
	}

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;

$image .= '>';

return $image;
 }

 

I get this error

 

Fatal error: Call to undefined function: tep_href_link() in /home/content/m/o/r/morristech/html/includes/application_top.php on line 467

then when I check on the main page I get this error:

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

look at this product link ............... http://www.mtechama.com/product_info.php?c...products_id=120

and should be like this ............ http://www.cpu.com/morristech/store/server...ils2.php?ID=103 and the others on my website is fine.

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

matter of fact here is an example of my snapshots http://www.mtechama.com/snapshot/snapshot2.htm I want to show this on my product info.

 

look at the diference:

 

http://www.mtechama.com/product_info.php?c...products_id=121

 

http://www.mtechama.com/product_info.php?c...products_id=120

 

See can you tell the diference

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

What is the "actual" size of the picture in your post?

 

Kevin

 

This is it (the actual image):

 

ac_ddr.jpg

 

Sizing that up is not going to result in any kind of useful result.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

This is it (the actual image):

 

ac_ddr.jpg

 

Sizing that up is not going to result in any kind of useful result.

 

 

Look at this link http://www.cpu.com/morristech/store/server...ils2.php?ID=103

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

This is it (the actual image):

 

ac_ddr.jpg

 

Sizing that up is not going to result in any kind of useful result.

 

 

Alan this is the actul size ac_ddr.jpg

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

ok I got my product image working but my problem is on my sub categories images and product listing images is crunched up how can I fix this?

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...