| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Disabled Javascript Support | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Disabled Javascript Support
I just wanted to share with people my Journey into the world of making x-cart more compatible when Javascript is Disabled.
1. OK First off I found this thread and I modified it to make a big Link for uses to tell x-cart their java is disabled. Thread: http://forum.x-cart.com/viewtopic.php?t=20533&highlight=blank Place this code under the body Tag in skin1/customer/home.tpl (for easycheckout people also for skin1/customer/home_checkout.tpl just change the href to "cart.php?js=n") Code:
!!Warning Search Engines will Index this as your site description most likely So I recommend inserting something like this between the above code and the <body> tag. Quote:
2. If you use the Java Selector for States and Country try this: ------------------------------------------------------------------------ With this mod if a person disables java "and does not tell x-cart" this will now allow them to fill out the Address info Only Issue is the Payment method step wont submit becuase it uses a button rather than a <input type="submit'> or <a href="">... see #3 to fix this. OK the Main Part of this Mod is to display a text box when the Users Javascript is disabled on their browser, they have not told x-cart they arent using java by clicking on the link and the Java Country State selector is enabled. Currently it just shows an empty space for County and State. Find skin1/main/register_states.tpl Between these Lines of Code: Code:
Insert this line: Code:
Just below this, Between these Lines of code: Code:
Insert This line: Code:
When I Disable the Java Country State Selector. I want to disable the STATE Drop Down List because if I do not have their state then all they can select is OTHER. Find skin1/main/states.tpl Line:2 Replace: Code:
With: Code:
This disable the drop down list, When Java Selector is disabled and when their is states in the DBase. Not Everyone will want this mod I know but those who do international and can't possible input every stat for every country OR dont want to. ---------------------------------------------------------------------- 3. Now Last but not least, and unfortunately this is an easy to say hard to do thing and x-cart has to many areas that need this modification to list hear. If you implement this concept correctly you can elliminate the need for a User to Click on the link that Tells x-cart Javacript is disabled. In x-cart they built support for Disabled Javascript. In the .tpl files you will see If then else statement like this that are ment two switch between java and html elements. Code:
Thier may be other elements that dont use the $js_enabled variable to switch between support for java and no java. All you do is replace: Code:
Code:
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#2
|
|||||||
|
|||||||
Does this supercede your other post on JS or is it in addition to....?
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
If you want I can copy and past it hear in place of the link I used but it is in addition.
Thanks For asking!!! Scott
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#4
|
|||||||
|
|||||||
That would be great....less confusing
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
Done I will work on making this be more organized but its hard I did my best I hope people understand what I am trying to do.
I wounder Has anyone esle delt with these issues??
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#6
|
|||||||
|
|||||||
do other major ecommerce sites assume java script??
As of right now if someone does not have java script enabled they would not be able to order with x-cart?
__________________
x-cart version 4.0.14 |
|||||||
#7
|
|||||||
|
|||||||
If someone has JavaScript turned off in their browser (most people DO NOT know how to do this) they are going to have issues on all sorts of sites.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||
|
|||||||
Users with javascript disabled is currently at about 10%.
__________________
Version 3.4.8 |
|||||||
#9
|
|||||||||
|
|||||||||
Is there a simple way to check if the customer has Javascript disabled and display a notice informing them that it should be enabled? Something like "Javascript needs to be enabled in your web browser for proper operation of your shopping cart".
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#10
|
|||||||||
|
|||||||||
You can set up a simple detection script by adding the following code to your customer/home.tpl template, within the <head> tag:
Code:
In this example I created a static page with pageid=1 that contains info about enabling javascript. Note that in the above code I test to make sure that the current page isn't the redirect destination page by checking the "pageid" get variable before including the meta refresh. Otherwise else you'll end up in an infinate refresh loop. You can see this script in action by browsing to my home page with javascript disabled in your browser. Tested on IE6, Firefox 1.5 and Opera 8.02 on the PC. Rubyaryat
__________________
Rubymods.com - Your X-Cart services partner for over 9 years. Modules offered: FedEx labels, Live currency rates, GeoIP, Order Audit, Multiple e-goods. X-Cart Store Hosting, project management and affiliates program available. 4.2.3 gold [Unix] |
|||||||||
|
|||
X-Cart forums © 2001-2020
|