Another More Info Page Pop-up request

General ShopSite user discussion

Another More Info Page Pop-up request

Postby Vernontnh » Tue Nov 11, 2008 8:11 am

I need to make my "more information page" pop up into a new window when the product photo is clicked. I have seen several suggestions, most of which are for pop-up image windows, which is not what I need. Currently, I just have the automated "create a more info page" checkbox checked in the product info section, and defined a specific URL for each more info page.

Robm suggested this:

[-- IF PRODUCT.DisplayMoreInformationPage --]

<!--
function popup() {
window.open( "[-- PRODUCT.MoreInfoURL --]",
"[-- PRODUCT.MoreInformationTitle --]", "status = 1, height = 400, width = 400, resizable = 1" );
}

-->
</script>
<a href="#" onClick="popup()">[-- PRODUCT.Name --]</a>
[-- END_IF --]


I put this with my "define product graphic" code, and it did not work. So I figured the script should go up with the head. I put it there, and still no go.

So I started trying to customize it for my needs. Here's my code as is, which still does not work:

-->
</style>
<script>
<!--
function popup() {
window.open( "[-- PRODUCT.MoreInfoURL --]",,"status = 1, height = 600, width = 600, resizable = 1" );
}

-->
</script>


Then here's my define product image code, with the code from Frank retro-fitted:

[-- DEFINE PRODUCT --]
<td width="485" align="left" valign="top">
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="216" valign="top"><img src="http://www.pogapparel.com/Website Graphic Folder/Cleardot.gif" width="216" height="15" />
<table width="216" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="216" scope="col"><span class="style1">[-- IF PRODUCT.DisplayGraphic --]
[-- IF PRODUCT.Graphic --][-- PRODUCT.Graphic --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
<a href="#" onClick="popup()"></a>
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]</span></th>
</tr>
<tr>

Here's the url to check:
http://pogapparel.com/shopsite_sc/cashm ... 30305.html

Any help would be most appreciated.

PS: For the heck of it, I tried putting the [-- PRODUCT.MoreInfoURL --] between the () next to popup, but that didn't work either.

Thank you.

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby BFChris » Tue Nov 11, 2008 11:58 am

Well, for one thing, the <a href> that contains the pop-up code isn't wrapped around anything, so it wouldn't make anything on the page an active hyperlink to trigger the popup code.

Try:

Code: Select all
[-- IF PRODUCT.DisplayGraphic --]
[-- IF PRODUCT.Graphic --][-- PRODUCT.Graphic --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
<a href="#" onClick="popup()">Click for More Info</a>
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]


You could also wrap the <a href> around the image, but it'd be a bit trickier because of all the IF statements.
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Postby Vernontnh » Tue Nov 11, 2008 12:48 pm

Hi Chris. Thank you. Unfortunately, that did not work.

Is there some place where I can find detailed instructions on how to create a customized moreinfo page template. It seems all the cookbook provides is barebones links, and the page tags.

So my next questions would be, what do you do once you've created a template? Do you create a new page and assign the custom moreinfo page template to it? I tried that and gave it a sensible short name.html. Then went into the product info section and checked, "create a more info page" and gave the page the same name as the page I just created. And whether or not the "create a new page" is checked or not, the result is that even with your code, the there is no window that pops up.


Any ideas?
Thanks,

Vernon
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Vernontnh » Tue Nov 11, 2008 12:54 pm

One more thing. When I click on the link, the url listed in the window stays the same, except the "#" sign appears after ".html"
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby Vernontnh » Tue Nov 11, 2008 1:02 pm

OK, so now I got it to at least go to the page, but not as a pop-up by changing href="#" to href="[-- PRODUCT.MoreInfoURL --]"

But I want a pop-up.

I tried putting the '[-- PRODUCT.MoreInfoURL --]' between the () after "popup" but that resulted in nothing happening.

HELP
Vernontnh
 
Posts: 59
Joined: Wed Nov 05, 2008 6:50 am
Location: USA

Postby BFChris » Tue Nov 11, 2008 2:49 pm

That would indicate a problem with the script that is supposed to create the pop-up window. Is the script still in the page?
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Postby BFChris » Tue Nov 11, 2008 2:55 pm

I see in your code for your output page the following:

Code: Select all
<script>
<!--
function popup() {
window.open("","status = 1, height = 600, width = 600, resizable = 1" );
}

-->
</script>


Note that the URL is missing.

Do you have a MoreInfo page defined for your product? Also, is the MoreInfo page defined within the Product template? (Remember, the MoreInfo page template is a subsection of a product template.)
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA


Return to User Forum

Who is online

Users browsing this forum: No registered users and 117 guests