|

Shipping address the same as billing checked?
Posted 24 August 2012 - 03:56 PM #1
My clients always use the same address for both also I disabled the shipping fields, so I use only the billing address fields and the checkbox is useless for me!
Posted 27 August 2012 - 07:05 AM #2

Posted 27 August 2012 - 12:23 PM #3
{if $completed_steps.step_two} {if !$cart.ship_to_another} <h4>{$lang.billing_shipping_address}:</h4> {assign var="profile_fields" value="I"|fn_get_profile_fields} <div class="checkout-address"> <ul class="shipping-adress clearfix"> {foreach from=$profile_fields.B item="field"} {assign var="value" value=$cart.user_data|fn_get_profile_field_value:$field} {if $value} <li class="{$field.field_name|replace:"_":"-"}">{$value}</li> {/if} {/foreach} </ul> </div> {else} <h4>{$lang.billing_address}:</h4> {assign var="profile_fields" value="I"|fn_get_profile_fields} <div class="checkout-address"> <ul class="shipping-adress clearfix"> {foreach from=$profile_fields.B item="field"} {assign var="value" value=$cart.user_data|fn_get_profile_field_value:$field} {if $value} <li class="{$field.field_name|replace:"_":"-"}">{$value}</li> {/if} {/foreach} </ul> </div> <hr> <h4>{$lang.shipping_address}:</h4> <div class="checkout-address"> <ul class="shipping-adress clearfix"> {foreach from=$profile_fields.S item="field"} {assign var="value" value=$cart.user_data|fn_get_profile_field_value:$field} {if $value} <li class="{$field.field_name|replace:"_":"-"}">{$value}</li> {/if} {/foreach} </ul> </div> {/if} {if $cart.shipping} <hr><h4>{$lang.shipping_method}:</h4> <ul> {foreach from=$cart.shipping item="shipping"} <li> {$shipping.shipping}</li> {/foreach} </ul> {/if} {/if} {assign var="block_wrap" value="checkout_order_info_`$block.snapping_id`_wrap"}
So if shipping same billing not display twice adresses.
if you dont like the adress switch you can simply add display: none; in css .address-switch
Posted 29 August 2012 - 01:53 PM #4
The solution you've posted for order_info.tpl is not for version 3, isn't it? As my order_info.tpl doesn't contain this code?
With the css change display: none; , I only hide the checkbox asking for "Shipping address the same as billing", but the fields of Shipping Address still stay on the page.
I use billing address as main and shipping address I don't need and deleted all the fields, so now on Shipping address section stays the E-mail field filled - is there any way to hide it or remove it too from the shipping section?
The other way is make the checkbox always checked somehow here in profile_fields.tpl, but how is the question

<div class="address-switch clearfix">
<div class="float-left"><span>{if $section == "S"}{$lang.shipping_same_as_billing}{else}{$lang.text_billing_same_with_shipping}{/if}</span></div>
<div class="float-right">
<input class="radio cm-switch-availability cm-switch-inverse cm-switch-visibilty" type="radio" name="copy_address" value="Y" id="sw_{$body_id}_suffix_yes" {if !$ship_to_another}checked="checked"{/if} /><label for="sw_{$body_id}_suffix_yes">{$lang.yes}</label>
<input class="radio cm-switch-availability cm-switch-visibilty" type="radio" name="copy_address" value="" id="sw_{$body_id}_suffix_no" {if $ship_to_another}checked="checked"{/if} /><label for="sw_{$body_id}_suffix_no">{$lang.no}</label>
</div>
</div>
Posted 08 September 2012 - 03:55 AM #6
HeyHow to make "Shipping address the same as billing" checkbox on Checkout page to be checked by default and also to be hidden? CS-cart 3.0.2
My clients always use the same address for both also I disabled the shipping fields, so I use only the billing address fields and the checkbox is useless for me!
I need help with the samething. Did you fine a fix for it yet? please, let me know.
Thank you
Tom
Hosting for less.
www.step2stephosting.com
Posted 24 September 2012 - 05:12 AM #8
I don't do any shipping. Yet, in step 2 of the check-out process, it asks for Email of shipping address (all other fields are de-activated and hidden but email can't be deactivated). Also, it displays a whole tab about Shipping Options which shouldn't be there.
How can I remove Shipping Address and Shipping Options? If there are no built-in features of this, I guess this request should go to the development team! It was working fine with v2.
Thanks!
Posted 02 October 2012 - 12:07 AM #9
- Make a backup then edit the file /core/fn.users.php
- <CTRL>+<F> for "function fn_compare_shipping_billing"
- Go to the line where it says "if (empty($profile_fields[$from_section]) || empty($profile_fields[$to_section])) {"
- Then make that return true; instead of return false;
- Upload, clear cache using ?cc method, clear cookies, etc. Then test.
Posted 02 October 2012 - 01:15 AM #10
Try this method for V3. It might not be the best, but cs cart didn't think it fully through I guess.
- Make a backup then edit the file /core/fn.users.php
- <CTRL>+<F> for "function fn_compare_shipping_billing"
- Go to the line where it says "if (empty($profile_fields[$from_section]) || empty($profile_fields[$to_section])) {"
- Then make that return true; instead of return false;
- Upload, clear cache using ?cc method, clear cookies, etc. Then test.
Hey,
Thanks, but it didn't work for me.
Hosting for less.
www.step2stephosting.com
Posted 02 October 2012 - 01:49 AM #11
HeyThanks for reply!
The solution you've posted for order_info.tpl is not for version 3, isn't it? As my order_info.tpl doesn't contain this code?
With the css change display: none; , I only hide the checkbox asking for "Shipping address the same as billing", but the fields of Shipping Address still stay on the page.
I use billing address as main and shipping address I don't need and deleted all the fields, so now on Shipping address section stays the E-mail field filled - is there any way to hide it or remove it too from the shipping section?
The other way is make the checkbox always checked somehow here in profile_fields.tpl, but how is the question:
Did you get it to work?
Hosting for less.
www.step2stephosting.com
Posted 29 January 2013 - 10:38 PM #12
1. find skins/basic/customer/views/profiles/components/profile_fields.tpl
change 14-15 row to:
<input class="radio cm-switch-availability cm-switch-inverse cm-switch-visibilty" type="radio" name="copy_address" value="Y" id="sw_{$body_id}_suffix_yes" checked="checked" /><label for="sw_{$body_id}_suffix_yes">{$lang.yes}</label>
<input class="radio cm-switch-availability cm-switch-visibilty" type="radio" name="copy_address" value="" id="sw_{$body_id}_suffix_no" /><label for="sw_{$body_id}_suffix_no">{$lang.no}</label>
2. add to css:
.address-switch {
display: none;
}
#ba{
display: none;
}
It's work for me

Posted 02 October 2013 - 04:51 AM #14
1. find /design/themes/basic/templates/views/profiles/components/profile_fields.tpl
change 14-15 row to:
<input class="radio cm-switch-availability cm-switch-inverse cm-switch-visibility" type="radio" name="ship_to_another" value="0" id="sw_{$body_id}_suffix_yes" checked="checked" /><label for="sw_{$body_id}_suffix_yes">{__("yes")}</label> <input class="radio cm-switch-availability cm-switch-visibility" type="radio" name="ship_to_another" value="1" id="sw_{$body_id}_suffix_no" /><label for="sw_{$body_id}_suffix_no">{__("no")}</label>
2. add to css:
.address-switch {
display: none;
}
#ba{
display: none;
}
Posted 04 October 2013 - 04:56 PM #15
From there, make sure that under Billing address, the E-mail option is filled in and checked under both "Profile Show/Required and Checkout Show/ Required.
Posted 11 October 2013 - 08:42 AM #16
2. change prifile_fields.tpl
{if $profile_fields.$section}
{if $address_flag}
<div class="address-switch clearfix">
<div class="float-left"><span>{if $section == "S"}{$lang.shipping_same_as_billing}{else}{$lang.text_billing_same_with_shipping}{/if}</span></div>
<div class="float-right">
<input class="radio cm-switch-availability cm-switch-visibilty" type="radio" name="copy_address" value="Y" id="sw_{$body_id}_suffix_no" {if !$ship_to_another}checked="checked"{/if} /><label for="sw_{$body_id}_suffix_yes">{$lang.yes}</label>
<input class="radio cm-switch-availability cm-switch-inverse cm-switch-visibilty" type="radio" name="copy_address" value="" id="sw_{$body_id}_suffix_no" {if $ship_to_another}checked="checked"{/if} /><label for="sw_{$body_id}_suffix_yes">{$lang.no}</label>
</div>
</div>
{/if}
3. Clear Cache
Posted 06 May 2015 - 10:08 AM #18
I use the 4.1 V , How can I do it?
Do you want just to hide the checkbox? Open the "design\themes\YOUR_THEME\templates\views\profiles\components\profile_fields.tpl" file and replace:
<div class="address-switch clearfix">
with
<div class="address-switch clearfix hidden">
Note that there should be identical list of product fields for the Shipping and Billing address sections.
CS-Cart USD 345 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 775 CS-Cart + YOUPI USD 545 Multi-Vendor Ultimate USD 7500 (6000)
Posted 06 May 2015 - 11:26 AM #19
https://scontent-fra...93b&oe=55D03001
Posted 06 May 2015 - 11:43 AM #20
https://scontent-fra...5ce&oe=55D49B00