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
  #41  
Old 02-08-2005, 04:42 PM
 
CopperB CopperB is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 58
 

Default

Thanks for the reply DogByte but I cannot find this template.

Quote:
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>

Are you sure about the home_checkout.tpl?

Thanks
__________________
CopperB

XCart Gold -> v4.0.11
PHP -> v4.3.10
MySQL -> v4.0.22
Apache -> v1.3.33
Smarty -> v2.6.3
Reply With Quote
  #42  
Old 02-08-2005, 04:50 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

I believe the code posted by Dogbyteman only works if you have Jon's EzCheckout mod installed.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #43  
Old 02-08-2005, 05:03 PM
 
CopperB CopperB is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 58
 

Default

Yep I'm going blind. Missed the reference to the ezCheckout mod by jon.
__________________
CopperB

XCart Gold -> v4.0.11
PHP -> v4.3.10
MySQL -> v4.0.22
Apache -> v1.3.33
Smarty -> v2.6.3
Reply With Quote
  #44  
Old 02-08-2005, 10:58 PM
 
jeremy35 jeremy35 is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default

Quote:
Originally Posted by CC
jeremy35 you still got errors man.

Just checked it out on your site...

Yep, you're right...I missed the register issue. Thanks for the heads up.
__________________
X-Cart Gold 4.1.9
Linux Server @ www.offbeathosting.com

Danger Den, LLC
www.dangerden.com
Water Cooling Computers!
Reply With Quote
  #45  
Old 02-09-2005, 08:15 AM
 
Bradc Bradc is offline
 

Member
  
Join Date: Jan 2005
Location: Canada
Posts: 18
 

Default

Hi all

Quick little hack so that the "Use Billing Address as Shipping Address" check box only shows up in anonymous check out and not in "create profile" (leave empty if same as billing address seems to work fine).

Code:
{* ======== COPY BILLING TO SHIPPING MOD ======= *} {if $action eq "cart"} <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> {/if} {* ======== COPY BILLING TO SHIPPING MOD ======= *}

Hope this helps!
__________________
X-Cart 4.0.11 Live
OS: Linux
php-4.3.10
Reply With Quote
  #46  
Old 02-09-2005, 03:12 PM
 
CopperB CopperB is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 58
 

Default

Thanks Brad. works like a charm.

I am still wondering if anyone has done this with an " Additional " Phone field in Billing and Shipping at anonymous check out.

As this is an additional field the code for this mod is not copying the phone field. I have not been able to figure out the additional code I need to add/call on in the copybilling.js

Also if I need to change/add any of the code in the other templates used.

If needed the website (which is not live yet) is at: http://www.copperboppers.com/xcart/home.php

Thanks again.
__________________
CopperB

XCart Gold -> v4.0.11
PHP -> v4.3.10
MySQL -> v4.0.22
Apache -> v1.3.33
Smarty -> v2.6.3
Reply With Quote
  #47  
Old 02-16-2005, 12:24 PM
 
torola torola is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: Toronto, Canada
Posts: 54
 

Default

See message bellow

Tom
__________________
Unix X-Cart PRO 4.0.12
Add-on: X-Affiliate
Reply With Quote
  #48  
Old 02-17-2005, 02:46 PM
 
torola torola is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: Toronto, Canada
Posts: 54
 

Default

Quote:
Originally Posted by CC
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){ 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 = ""; } }


The code works great except for one thing.

Here is my situation

My default country is Canada, so once I enter the registration page automatically country Canada is selected and you can choose Canadian Provinces.

Now, when a customer from US comes on the page and enters his address, changes country to United Stetes, and then chooses one of the US states, and everything seems OK

Then when you click on

"Use billing same as shipping addres" everything gets moved to the Shipping section, except for the states still show only Canadian Provinces even though the country changed to United States, you can only select Canadian province here.

Please let me know if this can be resolved somehow.

Thanks for the great mod.
Tom
__________________
Unix X-Cart PRO 4.0.12
Add-on: X-Affiliate
Reply With Quote
  #49  
Old 02-24-2005, 06:55 PM
 
Bella Forma Bella Forma is offline
 

Senior Member
  
Join Date: Nov 2004
Location: Australia
Posts: 150
 

Default

Just wanted to pop back and clarify something that was puzzling me and may puzzle others.

When I read this post initially a few people commented about the xcart default of 'leave empty if same as billing address' working just fine for version 4.0.*

I thought this was a bit odd as I am on version 4.0.11 and is wasn't showing so I presumed I must have messed it up when editing templates previously.

However today I decided to make my shipping fields 'not required' in the User Profile and lo and behold the 'leave empty if same as billing address' appears again and does indeed work just fine.

So you only have to use this mod if your shipping fields are required, unless of course you just prefer a checkbox.

Sorry if this is stating the obvious
__________________
X-Cart Gold 4.0.12
X-AOM, X-RMA, X-FancyCat
Apache/Linux Server
PHP 4.3.8
Reply With Quote
  #50  
Old 02-25-2005, 09:32 AM
 
torola torola is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: Toronto, Canada
Posts: 54
 

Default

Yes, you are right Bella Forma,

but that works only on the registration page.

Once in cart, proceed to check out, here you don't have that option and everything needs to be entered separately.

Tom
__________________
Unix X-Cart PRO 4.0.12
Add-on: X-Affiliate
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 09:31 AM.

   

 
X-Cart forums © 2001-2020