Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

check box for "same as billing address"

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 08-30-2004, 05:34 PM
 
adubas adubas is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 71
 

Default 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.
Reply With Quote
  #2  
Old 08-31-2004, 07:25 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

moved to bugs
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 09-01-2004, 01:55 PM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default 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!
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #4  
Old 09-10-2004, 04:36 PM
 
autocom autocom is offline
 

Newbie
  
Join Date: Sep 2004
Posts: 6
 

Default 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?
__________________
carpc club
Reply With Quote
  #5  
Old 09-10-2004, 05:37 PM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default

i agree a checkbox would really help..
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
Reply With Quote
  #6  
Old 10-11-2004, 01:54 PM
 
jimmy_ jimmy_ is offline
 

Advanced Member
  
Join Date: Sep 2004
Posts: 37
 

Default

Has anyone developed this checkbox?? I would be willing to pay for such a thing.... Could someone please help???
Reply With Quote
  #7  
Old 10-13-2004, 11:31 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default 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} <script language="JavaScript1.2"> function InitSaveVariables_shipping(form){ s_address = form.s_address.value; s_address_2 = form.s_address_2.value; s_city = form.s_city.value; s_state = form.s_state.value; _s_state = form._s_state.value; s_country = form.s_country.value; s_zipcode = form.s_zipcode.value; } function copybilling(form){ if (form.copyb.checked){ InitSaveVariables_shipping(form); form.s_address.value = form.b_address.value; form.s_address_2.value = form.b_address_2.value; form.s_city.value = form.b_city.value; form.s_state.value = form.b_state.value; form._s_state.value = form._b_state.value; form.s_country.value = form.b_country.value; form.s_zipcode.value = form.b_zipcode.value; } else { form.s_address.value = ""; form.s_address_2.value = ""; form.s_city.value = ""; form.s_state.value = form.b_state.value; form._s_state.value = ""; form.s_country.value = form.b_country.value; form.s_zipcode.value = ""; } } </script> {/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 ======= *} <TR> <TD align="right"></TD> <TD></TD> <TD nowrap> <input type="checkbox" name="copyb" onclick=javascript:copybilling(this.form);>Use {$lng.lbl_billing_address} as {$lng.lbl_shipping_address} </TD> </TR> {* ======== 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
__________________
xcartmods.co.uk
Reply With Quote
  #8  
Old 10-14-2004, 06:30 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default

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
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #9  
Old 10-14-2004, 06:33 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

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.
__________________
xcartmods.co.uk
Reply With Quote
  #10  
Old 10-14-2004, 07:02 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

Why can I not edit my post?
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:16 PM.

   

 
X-Cart forums © 2001-2020