Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please Help Me


wra77877

Recommended Posts

Does anyone know how to change the script to use the default image on file rather then use a amplification factor...when i use the amplification factor it distorts the image because it multiplies the small image by the amplification factor...i would like to just view the original image in the database...did i confuse anyone...heres the sample code for the product_info.php

 

<script language="javascript"><!--

function smallbig() {

var smallwidth = <?php echo SMALL_IMAGE_WIDTH; ?>;

var smallheight = <?php echo SMALL_IMAGE_HEIGHT; ?>;

//Set the amplificationfactor:

amplificationfactor = 4.0;

var largewidth = amplificationfactor * smallwidth;

var largeheight = amplificationfactor * smallheight;

if (document.image1.width == smallwidth) {

document.image1.width=largewidth;document.image1.height=largeheight;}

else {

document.image1.width=smallwidth;document.image1.height=smallheight;}

}

//--></script>

Link to comment
Share on other sites

amplificationfactor = 1.0; ???

 

 

1.0 just uses the small image and does not enlarge the image...i would like to enlarge the image but use the original large image on fil..i like the script and how it displays the image in the product_info page rather then open another window to enlarge the image...

Link to comment
Share on other sites

Ahhhhh, that was not what you asked the first time!!

 

There are many contributions which do this,

 

Go to the contributions and add one of the following:

 

http://www.oscommerce.com/community?contri...um&category=all

 

 

i didnt see anything that would help me there

it just shows how to make larger images in the popup window...i want to eliminate the popup window and display the large image in the product info page

Link to comment
Share on other sites

OK, I see what you''re saying now.

 

Heres the deal,

 

Install the sm, med, lg images contri.

 

This gives you the possibility of adding three image sizes to your database. Make the med and large images the same (use the same address in the database ) thus you have 2 images, the thumbnail for the catalog and a bigger one for the product_info page. You can delete the CLICK_TO_ENLARGE code if you want!

 

You also have the option then of adding a big image later. It's a small upgrade and should suit your current and future needs!

Link to comment
Share on other sites

I should have said,

 

that contri gives a small image for the listing, a medium image for the product_info and a large one for the popup so what I'm saying is, use it but disable the popup if you want!

Link to comment
Share on other sites

I should have said,

 

that contri gives a small image for the listing, a medium image for the product_info and a large one for the popup so what I'm saying is, use it but disable the popup if you want!

 

im not finding the answer to my problem...anyone else have an idea

 

thanks for the ideas and help

Link to comment
Share on other sites

I think you'd better explain what you are trying to achieve once more and why Brian's solution did nto work for you . because as far I I can tell Brian has given you the answer.

Link to comment
Share on other sites

He is using this contribution No more popup windows to enlarge pictures.

 

When you click on the picture in the product page it zooms iit up according to a admin set amplification factor. Basicaly it just enlarges the original thumbnail.

 

As i see it, he wants to change the javascript function to just "exchange" the small picture with the original picture when clicked upon......

 

B)

Link to comment
Share on other sites

He is using this contribution No more popup windows to enlarge pictures.

 

When you click on the picture in the product page it zooms iit up according to a admin set amplification factor. Basicaly it just enlarges the original thumbnail.

 

As i see it, he wants to change the javascript function to just "exchange" the small picture with the original picture when clicked upon......

 

B)

 

thats exactly right..i want to exchange the small thumbnail for the large pic in the database...any clue anyone

Link to comment
Share on other sites

I suggested the sm medium large contrib too, or a thumbnail.

 

Might want to say that the image sizes should go down in file size not up. Up always looks worse than down when sizing images...

 

unless the image you upload for the thumbnail is actually big, and if it is big then why not use a thumbnail contribution and then just specify the file size through admin and have the pic on the product page just be a big image?

 

To do what you want in my opinion would be much harder to accomplish because as far as I know you would have to somehow refresh the product page so the new image shows up, or edit that script a whole bunch.. to me, way way way too much work but there may be someone else who reads this that is better at javascripting and merging it with the php and database.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...