VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Popups
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JNCRacing
Starting Member

13 Posts

Posted - November 14 2003 :  05:24:16  Show Profile  Reply with Quote
I am trying to make the image on the shopexd page a hyperlink to a popup
window with a detailed picture of my products.

I am not using the field [cdescurl] so I added my link for the popup to that
field. I then added my javascript to my product template.

Here is an example. http://www.gb-host.com/web/shopexd.asp?id=1

Two things: First, how do I also make the image a hyperlink to the popup
and why is the popup window working but not calling the page? In my product
template I am calling for [cdescurl]


jonmadrid
VP-ASP New User

USA
192 Posts

Posted - November 14 2003 :  10:54:28  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
JNCRacing,

There are a few minor things you will need to do in order to make this work...

1) I think your javascript needs to be edited a bit since the html character codes (%5B and %5D) you have in place of the brackets seem to be goofing it up. Change this:

***********
<a href="javascript:;" onClick="MM_openBrWindow('%5Bcdescurl%5D','','width=600,height=400')">View Larger Image </a>
***********

to this:

***********
<a href="javascript:;" onClick="MM_openBrWindow('[cdescurl]','','width=600,height=400')">View Larger Image </a>
***********

2) To add the link to the image as well, you will need edit your template file and add the same link code as above to the image. It would look like this:

<a href="javascript:;" onClick="MM_openBrWindow('[cdescurl]','','width=600,height=400')">
<img border="0" src="[extendedimage]">
</a>


That should do the trick.

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com



Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 14 2003 :  14:28:33  Show Profile  Reply with Quote
Thanks for the info. I edited the files and although the popup window IS popping up, the actual page its looking for can not be found.

On the shop configuration I have the extended description of a product set to:

popups\alexandria.htm (and yes, that page is there)

this corresponds to:

http://www.gb-host.com/web/shopexd.asp?id=1

Any help will be appreciated.

Thanks


Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 14 2003 :  14:54:45  Show Profile  Reply with Quote
I found a way for it to work. I had to change the popups\alexandria.htm to http://www..../popups/alexandria.htm


Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 14 2003 :  14:58:09  Show Profile  Reply with Quote
On the alexandria.htm page, I set the title and the first line to [cname] but the actual name isn't showing up. Is this something that has to be hard-coded?

Go to Top of Page

jonmadrid
VP-ASP New User

USA
192 Posts

Posted - November 14 2003 :  16:03:48  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Is the Alexandria.htm file a static HTML file? If so, is there a reason you have it that way? The reason I ask is that it appears that means you would have to have a unique file for each item using that method. You could creat an ASP page that would show the product you wanted based on the productid that you could pass through the query string. All you would have to do then is define the large image source (and whatever else you want on that page) in the product record and away you go. It seems like that would be much easier than creating a new file for each item. That is unless each of those files (the popups that is) will be inherently different and a single template won't work.

In answer to your question, if your page is just a static HTML page, it will have no idea what [cname] is, since that is something that is generated by VPASP code, and will just display literally. Using the mehtod I described above, you could overcome that pretty easily.

Let me know if you have any questions.

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com



Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 14 2003 :  23:52:06  Show Profile  Reply with Quote
Thats totally what i would prefer but I don't know how to make that page...a little help?

Go to Top of Page

jonmadrid
VP-ASP New User

USA
192 Posts

Posted - November 15 2003 :  16:52:49  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
JNCR,

It's actually probably easier than you think. You can use the shopexd.asp file and a template that is specific to the popups. Here is what you would do:

1) Create a template file (tmp_Popup.htm or something like that)for the Popup windows. The HTML code for it, based on the way I see your shopexd.asp file displayed right now, might look like this:

*******
<p align="center">
<strong>[cname]</strong>
</p>
<p align="center">
<img border="0" src="[cimageurl]">
</p>
<p align="center">Actual product may differ slightly from image shown.</p>
<p align="center">
<a href="#" onClick="javascript:window.close();">close window</a>
</p>
*******

As you can see, it is very basic. Just the information you want displayed and the basic HTML to do that with. Save that and upload it.

2) Change the link for your popup to point to the shopexd.asp file and to use the necessary template. Here is the format:

shopexd.asp?id=123&template=yourtemplatename.htm

So, your code for the link to the Popup would now look like this:

*******
<a href="javascript:;" onClick="MM_openBrWindow('shopexd.asp?id=[catalogid]&template=tmp_Popup.htm','','width=600,height=400')">View Larger Image</a>
*******

And that's it. That should work for you very nicely. This eliminates some steps from your site maintenance:

a) You don't have to create new files for each product.
b) You don't have to add the file name in the cdescurl field, like you were doing before, since they will all be using the same file.

Let me know if that works for you. I hope it does!

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com



Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 15 2003 :  20:56:43  Show Profile  Reply with Quote
Woohoo!!! This works great except for one little thing...

I have another set of pics that are all sized at 600x360 and named imagename600.jpg

I looked at the products table and see that [cimageurl] calls for my imagename125.jpg images. How do I fix this?

Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - November 15 2003 :  21:11:50  Show Profile  Reply with Quote
I figured it out...i added it to [pother1]

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000