Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

popup image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-05-2005, 03:54 AM
 
shirtshop shirtshop is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 127
 

Default 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')">

__________________
ver 3.5.10 with a lot of customizing
now testing 4.4.1 smartytemplate
Reply With Quote
  #2  
Old 04-05-2005, 03:59 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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

{literal} insert code here {/literal}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-05-2005, 05:09 AM
 
shirtshop shirtshop is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 127
 

Default

Yes thats working, but when i click it away and then select a subcatory or a product the popup is comming up again?
__________________
ver 3.5.10 with a lot of customizing
now testing 4.4.1 smartytemplate
Reply With Quote
  #4  
Old 04-05-2005, 05:11 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

So you only want it on the front page? You will need to put an {if} statement in there then.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-05-2005, 05:24 AM
 
shirtshop shirtshop is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 127
 

Default

sorry i'm a totaly newbie in that. Where must i put that?
__________________
ver 3.5.10 with a lot of customizing
now testing 4.4.1 smartytemplate
Reply With Quote
  #6  
Old 04-05-2005, 05:36 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-05-2005, 07:39 AM
 
shirtshop shirtshop is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 127
 

Default

I did the the changes, the popup is showing but he's comming still again when i go to a subcat.
__________________
ver 3.5.10 with a lot of customizing
now testing 4.4.1 smartytemplate
Reply With Quote
  #8  
Old 04-05-2005, 07:44 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Sorry, that code must only work for newer versions
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020