Javascript in checkout process does not degrade gracefully

Project:Ubercart Contributions
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

Some functionality in checkout (e.g. tax and shipping calculations) rely heavily on javascript being switched on. I think that especially the tax calculations should degrade gracefully (probably means pushing more of it to the server). To my knowledg should (according to german law) tax on purchases (and to some extent shipping information) at all times be visible upon checkout and should not depend on javascript being switched on. I guess this requirement is also relevant for countries with strict web accessability regulations.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Javascript in checkout process does not degrade gracefully

While the customer fills out the checkout form, all of the updates are necessarily done in JavaScript so that we can keep a one-page checkout. However, once the "Review Order" button is clicked, all the values are recalculated by the server, so all the values displayed on the review page are as accurate and secure as they can be.

The shipping quotes and payment forms are still served by JavaScript, and I doubt that is going to change. Google Analytics says that over 99% of our stores' users have JavaScript enabled, and we figure that the few that don't will at least know how to enable it again to use our sites.

greenSkin's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/06/2007
Juice: 263
Re: Re: Javascript in checkout process does not degrade graceful
Assigned to:Lyle» greenSkin

If the checkout is not going to degrade gracefully from not having javascript support, then shouldn't there be a message given stating that javascript is required and maybe how to enable javascript. Though, I would like to see the checkout process not require javascript. I'd rather not let any potential buyer slip through the cracks.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Javascript in checkout process does not degrade grac
Assigned to:greenSkin» Ryan

This would be a good candidate to start out as a contributed module or something... I don't know exactly how you'd want it to work, but it seems like you can add the message to the top of the checkout form and hide it using JS.

greenSkin's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/06/2007
Juice: 263
Re: Re: Re: Re: Javascript in checkout process does not degrade
Assigned to:Ryan» greenSkin

I was thinking something more along the lines of the checkout process starts via an O.K. from javascript, thus printing the checkout screen. If the javascript does not return the O.K., namely javascript is disable, then a message is supplied. I don't know that this would be too hard, though there are probably a couple of different ways to pull this off.

greenSkin's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/06/2007
Juice: 263
Quote:Google Analytics says
Quote:

Google Analytics says that over 99% of our stores' users have JavaScript enabled, and we figure that the few that don't will at least know how to enable it again to use our sites.

Google Analytics records information via JavaScript so if a user does not have JavaScript enabled, then no information is going to be recorded.
http://stevebywater.blogspot.com/2007/12/google-analytics-cant-track-jav...

If you want to track if users have javascript enabled, you will have to gather your site's stats via something else that doesn't require javascript.

Fraser's picture
Offline
Joined: 10/24/2008
Juice: 16
shipping
Assigned to:greenSkin» Fraser

Does this mean if I have an ubercart shop with any sort of shipping costs applied users unable to use javascript cannot purchase anything through my shop?

Unfortunately there are disability discrimination laws in my country which make this slightly more than an inconvenience. Providing a shop that can't be accessed over a screen reader (i.e. usually without javascript) is a good way to get sued.

Have I missed some option that allows me to have a multipage form or automatically generate a shipping quote on the confirmation page?

Fraser's picture
Offline
Joined: 10/24/2008
Juice: 16
Re: shipping

Added a patch for uc_quote which gives a non-javascript alternative to the shipping quote javascript element (solves my problem anyway, might be of use to someone else)

http://www.ubercart.org/contrib/7172

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: shipping
Assigned to:Fraser» Ryan

You might also consider the fact that the payment details that come up in checkout are AJAXed in, too. We have plans to work on this in the D6 cycle, but it will stay like it is for D5.

Fraser's picture
Offline
Joined: 10/24/2008
Juice: 16
re: shipping
Assigned to:Ryan» Fraser

Aha.

The shop I'm working on only allows the one payment method and it's a "redirect to a different site" kind so it's bypassed any of the AJAX stuff there.

Thanks for the tip though - something to bear in mind for the next one if it's more integrated.

slake's picture
Offline
Joined: 10/09/2008
Juice: 19
Re: Re: Re: shipping
Assigned to:Fraser» slake

What is the current word on this in the D6 cycle?

BenStallings's picture
Offline
Joined: 03/13/2008
Juice: 91
A kludgy solution to this problem
Assigned to:slake» BenStallings

I just ran headlong into this problem yesterday -- the user was very upset and was unaware that he had Javascript disabled (thanks to IE's convoluted security settings).

My kludgy solution is to put the following HTML in the checkout instructions (admin/store/settings/checkout/edit/messages):

<noscript>
<p style="color:red">You appear to have Javascript disabled.  This page requires Javascript.  Please <a href="http://support.microsoft.com/gp/howtoscript" target="_blank">enable Javascript</a> and reload this page before continuing.</p>
</noscript>
sisko's picture
Offline
Joined: 09/17/2009
Juice: 260
#12
Category:» feature request
Assigned to:BenStallings» Guest

Hi guys,

just wondering if we can integrate a seperate ubercart payment area for mobile phones ?

The issue is the iPhone doesn't seem to support javascript so there is no way to execute a sale via mobile.

Perhaps an sms payment gateway ?