| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Detect For Non Javascript enabled users, and Warn them! | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Detect For Non Javascript enabled users, and Warn them!
I put this in [skin1]/customer/home.tpl after my </head> tag.
Code:
This should really ALREADY be implemented into the templates on install, since 10% of the total net population has it disabled, makes x-cart for any customer browsing your site with it disabled, utterly annoyoed because x-cart is so heavily based on javascript. I was trying to add a {php}exit;{/php} before </noscript> but it triggers anyhow. Anyone know a way to make the templates stop parsing? Happy holidays!
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#2
|
|||||||||
|
|||||||||
http://www.thecounter.com/stats/2002/November/javas.php
10% lost customers
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#3
|
|||||||
|
|||||||
JavaScript is needed in X-Cart for lot of advanced features. However, in the next release of X-Cart we will make sure that at least _basic_ features will work even if a customer does not have JavaScript enabled.
|
|||||||
#4
|
|||||||
|
|||||||
THX Boomer! Nice!
However I think it's a little more comfortable to put the code outside the head.tpl (speed, language) I did this: Insert in home.tpl: --------------------------snip <noscript> {if $store_language eq "DE"} { include file="customer/nojava_ger.tpl" } {elseif $store_language eq "US"} { include file="customer/nojava_engl.tpl" } {else} { include file="customer/nojava_engl.tpl" } {/if} </noscript> -------------------------snip Put your code (only the explanasion of course ) in a extra tpl-file under customer/nojava_engl.tpl for user who was prev. here and enabled javascript. The same for German and the last line ( after {else} ) for default (here english again) So the home.tpl is shorter to read I think and you can handel which language.... Cheers, mickna |
|||||||
#5
|
|||||||||
|
|||||||||
What about netscape 7.0 users
|
|||||||||
#7
|
|||||||||
|
|||||||||
Wow, people on netscape 1 !!
I mean if they are using netscape 7.0 you have no instructions on how to activate java |
|||||||||
#8
|
|||||||||
|
|||||||||
Perusing through the forums I discovered this simple but very nice mod. Thanks Boomer!
I implemented it using the method mickna described. I have updated the content of the file to better reflect current browsers as well as some corrections for language, spelling, layout, and etcetera. The following browsers are included in the information below: Mozilla 1.X Opera 5.X Opera 7.X Safari Public Beta 2 for MACOSX Internet Explorer 3.X Internet Explorer 4.X Internet Explorer 5.X Internet Explorer 5.X for MACOSX Internet Explorer 5 for MACOS9 Internet Explorer 6.X Netscape 3.X Netscape 4.X Netscape 4.X for MACOS9 Netscape 6.X for MACOSX Netscape 7.X AOL 3.0 AOL 4.0 and 5.0 The resulting code for a file called skin1/customer/no_javascript.tpl: Code:
The code for skin1/customer/home.tpl (placed beneath the <Body> tag): Code:
__________________
Site 1 > XCART LIVE 3.4.12 Site 2 > XCART LIVE 4.0.17 |
|||||||||
#9
|
|||||||||
|
|||||||||
Just to make life a bit easier I uploaded an HTML version for your viewing pleasure:
http://www.boomboombap.com/no_javascript.html Cheers ! :P
__________________
Site 1 > XCART LIVE 3.4.12 Site 2 > XCART LIVE 4.0.17 |
|||||||||
#10
|
|||||||||
|
|||||||||
Is it safe to do:
<script> all the original content </script> <noscript> { include file="nojava.tpl" } </noscript> So that you get one or the other but not both? |
|||||||||
|
|||
X-Cart forums © 2001-2020
|