When I check this box with javascript turned off and attempt to submit the order form, it turns an error telling me to fill in all the fields. While I understand that javascript is required to hide the fields, I do think that it is poor form to not have this box function without javascript (as it is very misleading).

If I could make two suggestions as a way to fix this:
1) Rather than hardcore the button into the page (so non-js users can see it), have jQuery add the element to the page onload.
2) On submit, if the button is checked, have the billing information be populated automatically.

CommentFileSizeAuthor
#1 454822.no_js_copying.2.x.patch2.52 KBcha0s
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cha0s’s picture

Assigned: Unassigned » cha0s
Status: Active » Needs work
FileSize
2.52 KB

Here's a patch towards this goal. It uses #after_build to copy over any values necessary. I have tested it and it looks like it works.

The only issue I see here (and maybe it's my own bunk configuration) is that I can't seem to choose a shipping method without JS, which is holding up the checkout regardless if the address fields are populated. Clicking the 'Click to calculate shipping' button actually throws the same error, that I have to choose a shipping method :?

Besides that, the address copying works with this patch, and in the case I refer to, when the form fails validation and throws you back, you can see that the other information is now populated on the form as well.

One other issue is that the 'My X information is the same as my Y information' checkbox is unchecked when that happens, even if it was checked when the form was submitted...

kmonty’s picture

After I submitted this ticket, I noticed the same problem. Not only can I not select a shipping option (even when I click the link), but if I try to purchase an order, it demands credit card information that I receive no form items to fill out.

Here are the issues with the form that do not work without JS enabled
1) The "same info" checkbox (which the patch appears to fix).
2) No way to select shipping (even when clicking the button refreshed the page)
3) No way to fill in credit card information (this might not be true if you do not accept paypal and only allow one payment method).
4) You cannot do international orders as when you change the country, AJAX cannot be called to replace the state/region drop down.

Perhaps we need to make the subject more generic? I personally believe this is an important issue (albeit not a critical one) as relying on AJAX could alienate a number of customers (depending on your business's focus, of course).

Island Usurper’s picture

Status: Needs work » Closed (duplicate)

There's already an issue that talks about gracefully degrading JavaScript, even if it doesn't mention the checkout page. (I would have thought that to be the most glaring problem.) #286933: Parts of interface don't work without JavaScript

We'll start tackling this in version 3, if we can ever get things settled down and release 2.0.

kmonty’s picture

I disagree that it isn't important for 2.x. Maybe not important enough for 2.0 but it should definitely make it into a point release.

Has this patch made it into that thread? It's definitely a useful part of the ultimate solution.