| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
check box for "same as billing address" | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||
|
|||||||
This appears not necessary for the 4.0.x versions??? Or is this mod just for the thrill of having the info actually populate into the fields?
__________________
X-Cart Gold various versions Tahoe Web Design WebsiteCM.com - We recommend WebsiteCM |
|||||||
#22
|
|||||||
|
|||||||
I don't use 4.0x, and I would prefer to have the info populate.
__________________
X-Cart version 4.7.12 |
|||||||
#23
|
|||||||||
|
|||||||||
As an update to this, find the following, this works in 4.0.9 and should work in 4.0.10
In copybilling.js: Code:
This will carry over names, address lines, states/counties depending on what you have and zip/post code. We only ship in one country so I havent tested the country drop down, but it should work ok. Only on the checkout signup will this work for names. On register.php this will not work, as it doesnt ask for a name. To make it work you need PhilJ's code you need to create a second register_billing_address.tpl such as register_billing_address2.tpl which would look to copybilling2.js with PhilJ's code in. Using the code above will leave you with JS errors on the page. The other files are just the same, although I presonally prefer a Button to click instead of a tick box. Looks more professional.
__________________
XC 4.2 inc (unofficial) patch release. |
|||||||||
#24
|
|||||||||
|
|||||||||
I should add, the First name and Last name needs to be removed from the Billling Address info in XC IMO.
I havent got around to removing them yet, but it is stupid that a new customer has to give 3 names on checkout! Thats 6 boxes they have to fill in just to give names. This IMO is silly as a lot of customers leave sites based on complicated signup forms, this not only looks complicated, it is totally unnecessary. Not to mention this is open to a security risk or easy mistakes for new customers on signup. Anyway, cant say too much as that is way off topic.
__________________
XC 4.2 inc (unofficial) patch release. |
|||||||||
#25
|
|||||||
|
|||||||
Thanks for posting the revised code.
Unfortunately, this still does not seem to be working for me.... I am using version 3.x of x-cart, not 4.x Does anyone have any idea whether that might be the cause, and where I would look to see about changing the .js file to fix this for the older version? The problem I'm having is that I get an error in IE, and when I check the box, it does not populate the new fields. The error I get is: Code:
Thanks in advance--I really want to get this working. It's a GREAT mod!
__________________
X-Cart version 4.7.12 |
|||||||
#26
|
|||||||||
|
|||||||||
Looks like your fields are named differently to the 4.0.x fields.
If you look in the copybilling.js code it is pretty straight forward. Look to see what your fields are call in 3.x and then match them up the this code.
__________________
XC 4.2 inc (unofficial) patch release. |
|||||||||
#27
|
|||||||
|
|||||||
I looked in 3.x and the fields appear to be the same.
__________________
X-Cart version 4.7.12 |
|||||||
#28
|
|||||||||
|
|||||||||
I'll take a look shortly...
__________________
XC 4.2 inc (unofficial) patch release. |
|||||||||
#29
|
|||||||
|
|||||||
I hugely appreciate it. I should say that address_2 in our cart is address2, which I changed in copybilling.js. It fixed an earlier error, but produced the "object required" error in the earlier post.
__________________
X-Cart version 4.7.12 |
|||||||
#30
|
|||||||
|
|||||||
Update: I've figured out where the problem is, but can't seem to get it fixed.
There are two problems; one I have figured out. The firstname/lastname needed to be "b_firstname" and "b_lastname"...easy. It also appears that it is the "state" code that is causing a problem. If I remove all of the state code from copybilling.js, it works fine, but of course does not copy the state over. I'm wondering whether 3.x handles the state selection differently than 4.x. Here is my states.tpl file: Code:
Here's the relevant part of register_billing_address.tpl: Code:
Any thoughts would be greatly appreciated.
__________________
X-Cart version 4.7.12 |
|||||||
|
|||
X-Cart forums © 2001-2020
|