Closed (won't fix)
Project:
e-Commerce
Version:
master
Component:
address
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2006 at 23:50 UTC
Updated:
19 Feb 2007 at 14:00 UTC
A client complained that it was tedious for site visitors to have to type in both shipping and billing addresses in order to checkout (mostly I'm concerned with anonymous purchases here). So, I wrote some simple javascript that goes into store.inc to create a button for people to easily copy shipping fields to billing fields. I omitted the country field because I'm only dealing with the US. That would be easy to change, though.
I like the code, I hope it will be useful to you.
| Comment | File | Size | Author |
|---|---|---|---|
| store.inc_shiptobill_patch | 2.52 KB | jesse_idc@civicspacelabs.com |
Comments
Comment #1
gordon commentedInstead of using some js to copy the address, why not put a checkbox to say as above and the php code in behind will copy the address.
This means that if js is turned off the user still has the same functionality.
Comment #2
neclimdulI agree with gordon. This degrades better. If you wanted some flashy js to go along with it, have a function bound to the click that disables the fields. This way the js user gets there money's worth and the non js user still gets the functionality.
Comment #3
gordon commentedWith the formsapi you are actually able to re-theme every form, so adding in the js is just a matter re-theming the form.
BTW, I would actually prefer this for cvs first before I apply this to 4.6
Comment #4
simepushing to HEAD
Comment #5
neclimdullike he said.
Comment #6
gordon commentedThis needs to be built using the new jQuery interface.
And it needs to be in it's own .js file.
Comment #7
simePlanned for V4
http://groups.drupal.org/node/2853