I wrote some javascript and placed it in the Text Area labeled "Text at the top of the Thank You screen:" at the top of the Thank You screen. It worked, but since the thankyou.cgi page isn't static, ebookgold refuses the connection and the unlock codes could not be accessed. So, I wrote this javascript and placed it in a table located in the Thank You Page Definition in a custom shopping cart template but then the shopping cart freezes to a blank screen when you try to access it. Is it possible to redirect to an alternate HTML thank you screen based on specific items in the shopping cart ?
Does anyone know how to redirect to an alternate static thankyou.html page If a specific product is in the customer's shopping cart?
- Code: Select all
<script language="javascript" type="text/javascript">
var i = 0;
var x = 0;
ProdName = new Array();
i = ss_name.length;
do
{
ProdName[x] = ss_name[x];
if(ProdName[x] == "TEST PRODUCT")
{
document.write("You MUST use the KEY NUMBER to unlock your eBook");
document.write("<img alt=" + "Unable to retrieve your PIN from the database. Please contact your e-book supplier for a valid PIN code." + "src="+ "http://www.ebookgold.com/1234/1234/" + " border=" + "0" + ">");
}
x++;
i--;
}
while(!(i == 0))
</script>
If anyone can offer assistance I would be extremely greatful. Otherwise, I think I just might have to pull my hair out.
Thanks in advance for you assistance
Craig