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

x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 11-01-2006, 02:49 AM
 
laffe laffe is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 46
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

How about if I only want the days to xmas?
I am no programmer so maybe you can tell me what to add and not to add?

LHN
__________________
sybo.no. your norwegian poker supplier

X-cart version 4.0.18
Reply With Quote
  #12  
Old 11-01-2006, 12:28 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

Laffe, just use the mod to the head.tpl at /your_shopcart/skin1/head.tpl

Its on the 1st thread, and don't forget the daystochristmas.js which needs to be uploaded to /your_shopcart/skin1/daystochristmas.js

Its on my site now, just that mod, as I wanted it to start at the begining of November.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #13  
Old 11-02-2006, 08:36 AM
 
JJD JJD is offline
 

Member
  
Join Date: Jul 2006
Posts: 11
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

Hi,

Does anyone know how to get this mod working in firefox, it works fine in IE.
I am referring to the snow part of the mod.

Regards,
__________________
X-Cart 4.1.2
Reply With Quote
  #14  
Old 11-02-2006, 11:29 PM
 
gastu gastu is offline
 

Senior Member
  
Join Date: Oct 2005
Location: Chile
Posts: 105
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

snow no work in safari
__________________
Gonzalo Astudillo Pizarro | https://about.me/gonzaloastudillo
Reply With Quote
  #15  
Old 11-06-2006, 04:43 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

This script works on FF, IE and Opr

Code:
//Configure below to change URL path to the snow image // var snowsrc="snow.gif" var snowsrc="skin1/images/snow.gif" // Configure below to change number of snow to render var no = 10; // Configure whether snow should disappear after x seconds (0=never): var hidesnowtime = 0; // Configure how much snow should drop down before fading ("windowheight" or "pageheight") // var snowdistance = "pageheight"; var snowdistance = "windowheight"; ///////////Stop Config////////////////////////////////// var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById&&!document.all) ? 1 : 0; function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600; if (ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = iecompattest().clientWidth; doc_height = iecompattest().clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); snowsrc=(snowsrc.indexOf("theshisha.com")!=-1)? "snow.gif" : snowsrc for (i = 0; i < no; ++ i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random()*(doc_width-50); // set position variables yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // set amplitude variables stx[i] = 0.02 + Math.random()/10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ie4up||ns6up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://theshisha.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>"); } } } function snowIE_NS6() { // IE and NS6 main animation function doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10; doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight; for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); } dx[i] += stx[i]; document.getElementById("dot"+i).style.top=yp[i]+"px"; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px"; } snowtimer=setTimeout("snowIE_NS6()", 10); } function hidesnow(){ if (window.snowtimer) clearTimeout(snowtimer) for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden" } if (ie4up||ns6up){ snowIE_NS6(); if (hidesnowtime>0) setTimeout("hidesnow()", hidesnowtime*1000) }
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #16  
Old 11-16-2006, 04:11 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

Quote:
Originally Posted by PhilJ
2) It slows your site down completely


around 18 seconds to load site. thats not good
thanks for the mod though, im sure there will be a few peeps who will want to use it.
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #17  
Old 11-28-2006, 08:18 AM
 
eastman eastman is offline
 

Advanced Member
  
Join Date: Aug 2005
Location: Wyoming
Posts: 74
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

Thanks, for the mod ShishaPipeUK. I'm using the countdown feature and trying to add it into my cart.tmp as well. I've used essentially the same code as head.tpl to insert it at the top of the cart:

Code:
<H3>{$lng.lbl_your_shopping_cart}</H3> {if $smarty.now|date_format:"%m" > 10} {literal}<script language="JavaScript" src="daystochristmas.js" type="text/javascript"></script>{/literal} {/if} {$lng.txt_cart_header}

I'm getting a smarty error referencing the '=' as an invalid tag when I test the code. If you have any ideas I'd be grateful.
__________________
X-Cart Pro v4.4.3
Reply With Quote
  #18  
Old 11-26-2009, 10:43 AM
 
delboy2028 delboy2028 is offline
 

Advanced Member
  
Join Date: Jan 2009
Location: UK
Posts: 97
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

will this work on 4.2
__________________
Version 5.3.1
Reply With Quote
  #19  
Old 10-22-2010, 07:01 AM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

Advanced Member
  
Join Date: Feb 2010
Location: Portugal
Posts: 38
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

Quote:
Originally Posted by delboy2028
will this work on 4.2

yes it will got it working a few minutes ago!

great mod thanks
__________________
PHP 5.2.11
MYSQL 5.0.45

WESH UK hosting

--- Add-ons -----
X-RMA
X-AOM
X-FancyCategories
X-Feature comparison

BCSE Request a Quote
BCSE Customer Testimonials
BCSE Advanced ratings and reviews
BCSE Customer reward points
BCSE Reward points refferal
BCSE Customer polls

Cart Labs - Tabs
Reply With Quote
  #20  
Old 10-23-2010, 01:31 AM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

Advanced Member
  
Join Date: Feb 2010
Location: Portugal
Posts: 38
 

Default Re: x-cart 4.1.3 Xmas Lights, Snow, countdown to xmas auto start in December

hey guys, im wondering if you could help me?

im currently using this mod and its working great but i want to add something else that builds onto this.

and it got me thinking if i can alter certain parts of the site design for these ocasions that would be great so for instance:

X-mas
Valentines day
Mothers day
fathers day
holloween

ect ect.

you get my point now i have tried to insert this code so that it calls up the specific graphic:

Code:
{if $smarty.now|date_format:"%m" > 10}<!--November countdown to x-mas --> <table align="left" background="{$ImagesDir}/head_linebg.gif" width="100%" style="background-repeat:no-repeat"> {else if $smarty.now|date_format:"%m" > 9} <table align="left" background="{$ImagesDir}/head_linebgstd.gif" width="100%" style="background-repeat:no-repeat"> {/if}

but if i decide to add more months to that it does not work?
is there a limit to the "else if" statement?

help would be great on this
__________________
PHP 5.2.11
MYSQL 5.0.45

WESH UK hosting

--- Add-ons -----
X-RMA
X-AOM
X-FancyCategories
X-Feature comparison

BCSE Request a Quote
BCSE Customer Testimonials
BCSE Advanced ratings and reviews
BCSE Customer reward points
BCSE Reward points refferal
BCSE Customer polls

Cart Labs - Tabs
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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:35 PM.

   

 
X-Cart forums © 2001-2020