wra77877 Posted April 26, 2005 Share Posted April 26, 2005 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 More sharing options...
Simmy Posted April 26, 2005 Share Posted April 26, 2005 amplificationfactor = 1.0; ??? Link to comment Share on other sites More sharing options...
wra77877 Posted April 26, 2005 Author Share Posted April 26, 2005 amplificationfactor = 1.0; ??? <{POST_SNAPBACK}> 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 More sharing options...
Simmy Posted April 26, 2005 Share Posted April 26, 2005 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 Link to comment Share on other sites More sharing options...
wra77877 Posted April 26, 2005 Author Share Posted April 26, 2005 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 <{POST_SNAPBACK}> 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 More sharing options...
Simmy Posted April 27, 2005 Share Posted April 27, 2005 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 More sharing options...
Simmy Posted April 27, 2005 Share Posted April 27, 2005 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 More sharing options...
wra77877 Posted April 27, 2005 Author Share Posted April 27, 2005 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! <{POST_SNAPBACK}> 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 More sharing options...
wra77877 Posted April 27, 2005 Author Share Posted April 27, 2005 im not finding the answer to my problem...anyone else have an idea thanks for the ideas and help <{POST_SNAPBACK}> can anyone help me with this Link to comment Share on other sites More sharing options...
radders Posted April 27, 2005 Share Posted April 27, 2005 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 More sharing options...
♥toyicebear Posted April 27, 2005 Share Posted April 27, 2005 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) Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
wra77877 Posted April 27, 2005 Author Share Posted April 27, 2005 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) <{POST_SNAPBACK}> 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 More sharing options...
Wendy James Posted April 28, 2005 Share Posted April 28, 2005 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 More sharing options...
Wendy James Posted April 28, 2005 Share Posted April 28, 2005 May want to check out this contribution. Has a zoom for the image on the product info page. http://www.oscommerce.com/community/contributions,3003 Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.