check box for "same as billing address"
When a customer goes to put in personal info, there needs to be a way for them to click for shipping address "same as billing address" - the defaul says leave blank if same as billing address. If you use UPS online tools, it does not work. The fields stay mandatory no matter if you make it not mandatory or not... is there a way around this so my customers do not have to type the info 2 times on the same page? Leaving it blank like the directions say does not work.
|
moved to bugs
|
various bugs
Here are some suggestions some I think are just bugs that got over looked.
Make the 'contact us' 'state' and 'country' fields work the same as the 'customer profile' 'state' and 'country' fields. i.e. When a customer selects a country the appropriate states are presented rather then showing all available states for all countries. Be able to choose the checkout 'active' and 'required' fields as you can for the user profile options in the admin general settings. This probably was over looked or assumed that setting them for customer profile would set them for checkout but they seem to work independently. Do not display the default shipping city, state and zip code when customer uses anonymous checkout. Keep the fields blank as they are for the billing fields. So that they will copy the billing information when not filled in. A better approach would be to have a check box that the customer could check when his shipping address was the same as the billing. By clicking this check box the customers billing fields would be automatically copied to the shipping fields. I hope that we can get some of these bugs worked out of X-cart soon. It's a great product! |
Error message
When I tried to leave the shipping address blank, it gives me an error message.
( Please make sure you properly filled in all the required fields! )is the message I get if I don't put in the shipping address. Then, we have to fill it out twice... I am using X-Cart 4.0 Can someone help? |
i agree a checkbox would really help..
|
Has anyone developed this checkbox?? I would be willing to pay for such a thing.... Could someone please help???
|
Possible solution...
Backup files first. Code works for me in v4.0.5
I've not tested it with a drop down menu for states/counties, but it should work ok. I use an input box for the state/county field. When I change country, it resets the state field, but I can live with that. --------------------------- 1) Create a new file in the skin1 directory called copybilling.js add this code: Code:
{literal} 2) in skin1/customer/home.tpl after Code:
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> add this code Code:
<script language=JavaScript1.3 src="{$SkinDir}/copybilling.js"></script> 3) find skin1/main/register_billing_address.tpl After the last </TR> add this code add Code:
{* ======== COPY BILLING TO SHIPPING MOD ======= *} --------------------------- Done. I would then change the language variable - lbl_shipping_address_registration from Code:
Shipping Address (leave empty if same as billing address) to just Code:
Shipping Address |
This mod didn't work for me. I carefully followed the instructions but I'm getting an error on the checkout page both when the page loads and when I click on the 'Use Billing Address as Shipping Address' checkbox. I would appreciate help figuring out what is wrong. You can test it for yourself at http://www.inksticks.com/store
|
As I mentioned, I haven't tested it with drop down menus for the states field. I'll get back to you with a fix shortly.
|
Why can I not edit my post?
|
Remove
Code:
{literal} and Code:
</script> from step 1, and then refresh. |
Great! no more errors. However l thought when I click on the box that it would populate the shipping address fields. When I click it appears that nothing happens but I do not get any error messages either. Is this right? It would be better is seems if the address as visibly copied when the customer clicks the box.
|
In Internet Explorer it does fill the shipping fields when the box is checked but in Mozilla Firebox it does not. It looks like it was a problem with my browser.
|
copy billing address to shipping
This works great, how would I make this also copy the County?
|
Quote:
Didn't populate for me when I just tested it a second ago in IE 6, it gave out a javascript error. |
I am getting an error also and it doesn't populate the fields.
Inksticks--did you do anything special to get yours working? This is a great feature, but something is not working right; I'm using IE 6.0. |
This is just what I am looking for.... please someone get it working :D
|
Yea, I just tried this and I'm getting Java error and its not populating fields. Is there any X-cart pro's that can get this working. I'm sure a BUNCH of folks would use this!!! THANKS FOR ANY HELP
|
If this thread can be moved to custom mods, I'll update my original post. You can't edit posts in this forum.
|
Until that time, can you copy/paste and/or repost? Or perhaps PM with the updates? I'd hugely appreciate it!
|
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? :)
|
I don't use 4.0x, and I would prefer to have the info populate.
|
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:
function InitSaveVariables_shipping(form){ 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. |
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. ;) |
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:
Line: 9 Thanks in advance--I really want to get this working. It's a GREAT mod! |
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. |
I looked in 3.x and the fields appear to be the same.
|
#-o
I'll take a look shortly... |
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.
|
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:
{* $Id: states.tpl,v 1.1.4.3 2004/04/09 07:07:28 svowl Exp $ *} Here's the relevant part of register_billing_address.tpl: Code:
<tr valign=middle> Any thoughts would be greatly appreciated. |
Ok--I got it. Here is the copybilling.js for 3.x...or at least this is what worked for me:
Code:
function InitSaveVariables_shipping(form){ |
Fist off thanks for this MOD. It is great. As stated it should be standard in Xcart.
The mod works just as it should be but I have added an " Additional " Phone field in Billing and Shipping. As this is an additional field the code is not copying the phone field. I have not been able to figure out the additional code I need to add in the copybilling.js Also if I need to change any of the code in the other templates used. If anyone knows what I need to add/change that would be great. Thanks |
Hi,
Thanks for your great work, i am using 4.0.11 I followed all of your instructions change the last code you posted but i still getting error. I will be grateful for help Thanks |
1) Create a new file in the skin1 directory called copybilling.js
add this code: Code:
function InitSaveVariables_shipping(form){ 2) in skin1/customer/home.tpl after Code:
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> add this code Code:
<script language=JavaScript1.3 src="{$SkinDir}/copybilling.js"></script> 3) find skin1/main/register_billing_address.tpl After the last </TR> add this code Code:
{* ======== COPY BILLING TO SHIPPING MOD ======= *} I have tested in Firefox 1.o and IE 6.0 and both work Hope this helps |
CopperB
Thanks, this worked great for me! |
NP jeremy. Glad to hear that it worked for you.
Has anyone tried this with an " Additional " Phone field in Billing and Shipping. As this is an additional field the code mod is not copying the phone field. I have not been able to figure out the additional code I need to add in the copybilling.js Also if I need to change/add any of the code in the other templates used. Thanks |
jeremy35 you still got errors man.
Just checked it out on your site... |
It would appear that some are not giving consideration to the two different registration forms.
Remeber, there is a Checkout sign up page AND and general register page. They dont have the same sign up fields. The general sign up page does not ask for the a Name twice, the checkout sign up does. So on the general signup you have no name field to carry across twice, hence the error. Either create two templates for this or use this .js code: Code:
function InitSaveVariables_shipping(form){ |
CC
You are right. It works on my checkout sign up but not on the general signup. This is from a post of yours earlier in this thread. Quote:
Would you be able to post the code for those 2 new files and what other templates need modified. Thanks |
Instructions for 4.0.x using the ezCheckout mod by jon:
In your skin1 folder create the following files copybilling1.js Code:
function InitSaveVariables_shipping(form){ copybilling2.js Code:
function InitSaveVariables_shipping(form){ In skin1/customer/home_checkout.tpl after Code:
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> add this code Code:
<script language=JavaScript1.3 src="{$SkinDir}/copybilling1.js"></script> In skin1/customer/home.tpl after Code:
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> add this code Code:
<script language=JavaScript1.3 src="{$SkinDir}/copybilling2.js"></script> Find skin1/main/register_billing_address.tpl After the last </TR> add this code Code:
{* ======== COPY BILLING TO SHIPPING MOD ======= *} |
All times are GMT -8. The time now is 02:29 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.