Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Remove javascript dependency from checkout process
 
yabba
Jr. Member
 
Total Posts:  3
Joined:  2008-09-12
 

I’m in the middle of coding a custom skin for a client and I need to be able to remove the javascript dependency from the checkout process as our intention is to have a fully accessible store that meets the WAI/508 standards.

So far I’ve managed to bypass the majority of the javascript dependencies but the checkout process totally fails without it,. If it’s not currently possible then could someone point me to the files that actually process the ajax request so that I can see if I can bend them to my will?

Â¥

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Hi yabba, I am looking into doing this too.

Anyway, I i did a quick test locally, and believe I a heading in the right direction. In the onepage.phtml, if you trim out all JS, and remove the style="display:none inline style, perhaps also commented all CSS for OPC, then you will see the 6 steps loaded in one single page except the review order part in step 6 (loaded by json I think). The ‘place order’ button is unclickable in my quick test case though.

You still need to work on individual phtml files for each step to make it work. One instance, in the step 2, you will see the ‘password’ field, this one actually is hidden if a customer checkout as guest.

I hope this is a good pointer for you smile Please update your result OK?!

 
Magento Community Magento Community
Magento Community
Magento Community
 
yabba
Jr. Member
 
Total Posts:  3
Joined:  2008-09-12
 

Hi Chinesedream,
Thanks for the reply, I’ve been playing with those files but it’s the submit action that I’m trying to alter the behaviour of. I have no problem with the forms being enhanced by javascript but for them to totally fail if javascript is disabled/unavailable isn’t acceptable.

A swift update, I’ve found the file that handles the form data when it’s “submitted” ( /app/code/core/Mage/Checkout/controllers/OnepageController.php ), and I can stop it “replying” in javascript ( which means that I can add a “flag” for javascript/non-javascript reply ),. so now I just need to workout how to display the full page again *if* it’s a non-javascript request.

I did just try a header redirect to /checkout/onepage/ but it reset all the fields confused It’s never the simple solution huh?

The reason why the button doesn’t work on click is because it’s outside the <form></form>, you also need to add the action and set the method to post to make the forms work.

<form id="co-billing-form" action="<?php echo $this->getUrl('checkout/onepage/saveBilling'); ?>" method="post">

I’ll keep playing with this as it’s a deal-breaker for us and I’m *really* not in the mood to have to redo all of our customisations on another cart .... and our client would probably be a tad upset if they had to redo all their stock wink

I’ll let you know if I strike gold ... even if it is by pure luck :D

Â¥

 
Magento Community Magento Community
Magento Community
Magento Community
 
CyberCoderOne
Jr. Member
 
Total Posts:  2
Joined:  2008-09-21
 

Hi I have being reading your post. You have some very interesting finding . I just want to know have you being successful in implementing the onepagecheckout or you are still experimenting with it . Any new development will be much appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
yabba
Jr. Member
 
Total Posts:  3
Joined:  2008-09-12
 

Sorry for the huge delay in replying but I was on holiday wink

The latest upgrade ( 1.1.6 or something ) cured all the javascript errors with 1 page checkout but I still haven’t found a way to make it work if javascript is disabled.

The end result is that we’ve decided to finish the store so that we can get it live and then we’ll be looking for another e-commerce solution or expanding some other software that we help to develop to add e-commerce functionality to it.

Â¥

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top