Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Jscript body integration for snow effect

Jscript body integration for snow effect

Views: 1,231

Results 1 to 10 of 10
24 Sep 2012, 7:53 PM
#1
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

Jscript body integration for snow effect

Hi all

I am wanting to add a subtle snowflake effect to my test website, I have created a new file in my template override folder called jscript_snowfall.php which opens and closes with </script> tags. (I also tried a jscript_snowfall.js type file without the tags)

The problem is the snowflakes just appear on top of each other and dont move, I think I need to use css to style them somehow, or say no style should apply as they appear in the top corner.

What is the best approach to solve this?

My site is

http://test.italianhampers.co.uk

I got the code from, and want the same effect as..

http://www.hypergurl.com/snowmaker.html

Thanks for any help.

Andy

24 Sep 2012, 8:08 PM
#2
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Jscript body integration for snow effect

The instructions for the script say to place the script after the body tag. When you place scripts in the template overide folder they load into the <head> section. Try removing the jscript file you have and placing the code after the opening body tag in includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

I hope that helps :)

24 Sep 2012, 8:24 PM
#3
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

Re: Jscript body integration for snow effect

Thanks Lisa

I tried that initially, and it loads in my footer instead, in the same way, all flakes are on top of each other. I think the Jscript needs to be forced to have its own style somehow.
Thanks for the suggestion though.

24 Sep 2012, 8:26 PM
#4
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Jscript body integration for snow effect

Yeah I tried loading it on my test site and it doesn't work there either. I'll keep digging and see if I can help lol

25 Sep 2012, 4:43 PM
#5
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: Jscript body integration for snow effect

Are you using this mod?

http://www.zen-cart.com/downloads.php?do=file&id=819

It worked on my 138a-139h site. Have not tried with 150.

I wanted the snow to show only below the header, but have not yet figured this out.

25 Sep 2012, 7:27 PM
#6
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

Re: Jscript body integration for snow effect

Yes- I tried that mod, but I preferred the code that I found as it doesnt use gifs or graphics for the snowflakes.
I copied how the author integrated the script into zencart to make my own mod based on the code I found above, but I still believe the issue is the css in my template is formatting the snowflakes as a font, and so they dont move around and appear all in the same position.

I need a way of writing the javascript to say css rules on my site should ignore the snowflake asterisks ..not sure how to do this though

26 Sep 2012, 5:45 AM
#7
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Jscript body integration for snow effect

mi16chap:

Yes- I tried that mod, but I preferred the code that I found as it doesnt use gifs or graphics for the snowflakes.
I copied how the author integrated the script into zencart to make my own mod based on the code I found above, but I still believe the issue is the css in my template is formatting the snowflakes as a font, and so they dont move around and appear all in the same position.

I need a way of writing the javascript to say css rules on my site should ignore the snowflake asterisks ..not sure how to do this though

I have the Snow_Javascript you are talking about working. You can download it from here. Enjoy

30 Sep 2012, 5:14 PM
#8
mi16chap avatar

mi16chap

New Zenner

Join Date:
Oct 2011
Location:
West Yorkshire - England
Posts:
38
Plugin Contributions:
0

Re: Jscript body integration for snow effect

countrycharm:

I have the Snow_Javascript you are talking about working. You can download it from here. Enjoy

Yes - exactly what Im trying to do, if I install the mod you mention, I get the same issue, the * characters all form over the top of each other, rather than as snowflakes. :-(

30 Sep 2012, 6:29 PM
#9
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Jscript body integration for snow effect

countrycharm:

I have the Snow_Javascript you are talking about working. You can download it from here. Enjoy

Works fine on my 1.5 test site.
What other mods do you have installed mil6chap?

30 Sep 2012, 8:23 PM
#10
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Jscript body integration for snow effect

mi16chap:

Yes - exactly what Im trying to do, if I install the mod you mention, I get the same issue, the * characters all form over the top of each other, rather than as snowflakes. :-(

picandnix:

Works fine on my 1.5 test site.
What other mods do you have installed mil6chap?

Works fine on my zen Cart v1.51 test site also. You must have something else wrong stopping it from working correctly.