X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   popup image (https://forum.x-cart.com/showthread.php?t=13224)

shirtshop 04-05-2005 03:54 AM

popup image
 
I want to get a popup when the customer come on our site.
I found a generator for this, but where (which files) must i change to get the effect.
This is the source of the generator.

<!-- TWO STEPS TO INSTALL POPUP WINDOW:

1. Paste the first into the HEAD of your HTML document
2. Use the code to open the popup page on your site -->



<HEAD>

<SCRIPT LANGUAGE="JavaScript">



<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=1024,height=768,left = 0,top = 0');");
}
// End -->
</script>




<BODY onLoad="javascript:popUp('http://www.mydomin.com/test/test.jpg')">


balinor 04-05-2005 03:59 AM

Both go in customer/home.tpl. Just be sure to use {literal} tags around your code:

{literal} insert code here {/literal}

shirtshop 04-05-2005 05:09 AM

Yes thats working, but when i click it away and then select a subcatory or a product the popup is comming up again?

balinor 04-05-2005 05:11 AM

So you only want it on the front page? You will need to put an {if} statement in there then.

shirtshop 04-05-2005 05:24 AM

sorry i'm a totaly newbie in that. Where must i put that?

balinor 04-05-2005 05:36 AM

Try replacing your <body> tag in home.tpl with this:

Code:

{if $main eq "catalog" and $current_category.category eq ""}
<BODY onLoad="javascript:popUp('http://www.mydomin.com/test/test.jpg')">
{else}
<body>
{/if}


Replace the link to the popup with whatever you used. Be sure to make a backup of home.tpl first.

shirtshop 04-05-2005 07:39 AM

I did the the changes, the popup is showing but he's comming still again when i go to a subcat.

balinor 04-05-2005 07:44 AM

Sorry, that code must only work for newer versions :(


All times are GMT -8. The time now is 07:41 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.