[ic] Javascript and payment selection in demo

Mike Heins mike at perusion.com
Thu Oct 13 14:01:09 EDT 2005

Quoting Joshua Lavin (joshua at kingdomdesign.com):
> On Oct 12, 2005, at 7:07 PM, Randy Just wrote:
> >1) I am working on a modified version of the Interchange demo.  The  
> >problem I
> >am having relates to the payment selection list.  When javascript  
> >is turned on
> >for my browser, it works just fine.  That being, if credit card is  
> >selected for example,
> >then the entry fields show up to enter the credit card data.   
> >However, we have some users
> >who leave javascript off.  If the option is off, then selecting any  
> >of the choices results
> >in no method being displayed (i.e. credit card entry fields do not  
> >show up).  I am working
> >with new_browser_payment_multi in addition to payment_select_multi
> >
> >What is a trick I can use to allow for javascript disabled folks to  
> >still be able to have
> >the credit card info pop-up or the other responses for payment  
> >methods?
> You may need to check the demo catalog as to how it does things, but  
> in my understanding, there is a check which runs to see if a 'new'  
> browser is being used, and if so, sends the Javascripty-form. If an  
> 'old' browser is used, it should deliver the old_browser_payment.
> E.g.:
> [if scratch old_browser]
>  [include include/checkout/old_browser_payment]
> [else]
>  [include include/checkout/new_browser_payment]
> [/else]
> [/if]
> I'm not sure where that scratch is set though. But the demo catalog  
> would tell you...

On the multipage checkout, you can do on ord/country or ord/shipping:

[set jscheck]
	[set old_browser]1[/set]

<input id=jscheck type=hidden name=mv_click value=jscheck>
	var el = document.getElementById('jscheck');
	if(el != undefined)
		el.value = '';

Then if they are in a browser without javascript, you can send
them to a dumbed-down one-page checkout form. This would mean removing
the state_select and country_select widgets.

Probably we should figure out a way to spit this out by default, but in
practice, not too many people disable JavaScript these days -- or they
are used to enabling it for commerce sites. We rarely get complaints.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry

More information about the interchange-users mailing list