Author |
Topic |
|
Mark Priest
VP-CART Expert
United Kingdom
580 Posts |
Posted - July 21 2002 : 23:33:18
|
Hi All.
A customer of mine who is using 3.5 wants to display a large image in a pop-up window when the thumbnail is clicked on, any ideas how to do this?
Regards,
Mark http://www.isee-multimedia.co.uk |
|
Lori Titus
VP-CART New User
144 Posts |
Posted - December 19 2004 : 14:58:31
|
I am also interested in this. Did anyone find a solution? v.5.5
For example, some clicks on a category, and a list of products appear. The products show a thumbnail image. The thumbnail image currently links to the extended description page. However, I would rather that the thumbnail links to a larger picture in a popup window, with no description.
The Internet's #1 supplier of honey and beeswax. |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - December 19 2004 : 17:33:20
|
I'm not sure what you'd do on 3.5, but on 5.5 you could add a small javascript function to the template that brings up a relevantly-sized popup window, and then pass the extended image to that javascript function in a javascript call on an href on the thumb. Ideally, you'd want the popup to be an asp rather than just a popupwindow with just the image, and then you'd also be able to add a close-window button on the popup. How it's done would also depend on whether you want the size of the window to be dynamic depending on the image size or if you want it a fixed size.
Here's a sample javascript function that you can use to bring up a popup window of a specific size with no bar/menu etc:
<SCRIPT LANGUAGE="JavaScript"> function nobar_popup(in_url) { var winid; var winoptions; winoptions= "menubar=no"+ ",toolbar=no"+ ",status=no"+ ",scrolling=yes"+ ",scrollbars=yes"+ ",resizable=yes"+ ",border=0"+ ",width=600"+ ",height=550"+ ",left=50"+ ",top=0"; winid=window.open(in_url,"",winoptions); } </SCRIPT>
the link for this in the template would be something like:
<a href="javascript:nobar_popup('[extendedimage]')"><img src="[cimageurl]" border=0></a>
However, if you're talking about the product-summary results page then that javascript function should be held at a higher level (in shoppage_header, say) so that it doesn't get repeated for each product.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons
Edited by - devshb on December 19 2004 18:02:47 |
|
|
bmw000
VP-CART New User
137 Posts |
Posted - December 19 2004 : 18:27:31
|
Set xextendedpopup to Yes.
Yes allows the extended description image or page to be pop-up as a separate window
This works is version 5.5. I am unsure if this will work for version 3.5.
Brian Weber BMW Solutions, LLC http://www.bmwsolutions.com/shopping
|
|
|
Lori Titus
VP-CART New User
144 Posts |
Posted - December 23 2004 : 16:47:21
|
Setting xextendpopup=Yes makes the entire extended description page popup. I only wanted a larger picture of the item. I also wanted to do this from shopproductformat.asp. Here is what I did. (It is a modification of devshb's code):
I got it to work in shopproductformat.asp, without using templates. Here is what I did:
Around line 330, insert <SCRIPT LANGUAGE="JavaScript"> function nobar_popup(in_url) { var winid; var winoptions; winoptions= "menubar=no"+ ",toolbar=no"+ ",status=no"+ ",scrolling=yes"+ ",scrollbars=yes"+ ",resizable=yes"+ ",border=0"+ ",width=500"+ ",height=500"+ ",left=50"+ ",top=0"; winid=window.open(in_url,"",winoptions) } </SCRIPT>
Then change <p align="center"><img border="0" src="<%=strcimageURL%>"></p>
to <p align="center"><a href="javascript:nobar_popup('<%=strextendedimage%>')"><img border="0" src="<%=strcimageURL%>"><br><b>Click image for larger picture</b></a></p>
Does exactly what I need it to do. Thanks for your input, guys!
The Internet's #1 supplier of honey and beeswax. |
|
|
bmw000
VP-CART New User
137 Posts |
Posted - December 23 2004 : 22:29:37
|
If you put the path to the large image in the exteneded description field using xextendedpopup to Yes then only the large picture will pop up in a new window. I guess I forgot to mention the path to the large image in the extended description field. Sorry.
Brian Weber BMW Solutions, LLC http://www.bmwsolutions.com/shopping
|
|
|
Lori Titus
VP-CART New User
144 Posts |
Posted - December 24 2004 : 07:34:21
|
I can see how this is a quicker method to the same end. I am learning how to code in vpasp as I go along, so figured out the other method first. Think I'll change it over, though. Thanks!
The Internet's #1 supplier of honey and beeswax. |
|
|
|
Topic |
|