Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Borders around product photos?


AnnieO

Recommended Posts

Hi

 

Just a though..

There is contribution which adds a shadow around the photo..

You might want to consider that.

It is very nice, I have it and the photo look very professional.. (big photo)

 

Salvo

Link to comment
Share on other sites

To answer your question, the product images are emitted from default.php and product_info.php. They echo the results of calls to the function tep_image, which constructs the html <img> based on parameters to the call.

 

There are five parameters to tep_image, of which only the first is mandatory (the file reference for the image); the second, third and fourth are ALT, WIDTH and HEIGHT. The optional fifth parameter may contain anything that can be stuck into an <img> tag just before the closing >.

 

So, you could modify the code in default.php and product_info.php by adding "border='1'" to the parameters of the tep_image calls.

Link to comment
Share on other sites

Oops, ignore my suggestion regarding the fifth parameter.

 

The function tep_image actually inserts the "border='0'" (at line 81 in html_output.php,v 1.49).

 

You could change that, but it will affect all image displays not just those of the products.

 

Or, you could follow my original suggestion to use the fifth parameter but also add a test in tep_image that checks to see if the fifth parameter is a border tag before inserting the border=0 default.

Link to comment
Share on other sites

Wo! That is interesting. I looked everywhere for where that border="0" was coming from and now I see it. :D

 

I'm trying to figure out how to just use border for product now. Maybe there is hope.

 

Thanks for pointing this out to me.

Link to comment
Share on other sites

Thanks to zzfritz showing me how this was done, I was able to add this to my stylesheet

 

.borders { border: solid 1px #4C4C4C }

 

and use class="borders" to override the borders="0"

 

What a terrific forum!

Link to comment
Share on other sites

  • 3 months later...
Hi

 

Just a though..

There is contribution which adds a shadow around the photo..  

You might want to consider that.

It is very nice, I have it and the photo look very professional.. (big photo)

 

Salvo

 

This sounds like a a great contribution. I couldn't find it though...

Would anybody know where I can get this?

 

Thanks much,

Dan

Link to comment
Share on other sites

  • 2 weeks later...

this is what worked for me:

 

copy the entire section for the function "tep_image" in html_output.php, and paste it underneath itself in the same file. Then rename the copied function "tep_image2", and set its hardcoded border to 1 or any other value you want.

 

now for all images you want with a border, just rename the function calling that image to tep_image2...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...