Jump to content

Disable Billing Address Box


Recommended Posts

Hi everyone,

 

When proceeding through checkout at the 3rd step, shipping and billing addresses appear, my problem is that i need billing address box aswell as some other buttons to be invisible for the customer and billing adress would alway be the same as shipping. Is it possible to do so?

 

heres a screenshot:

 

post-801677-0-35727100-1401320030_thumb.jpg

 

Things I am trying to remove are marked with red crosses.

 

 

Thanks, for your help.

Edited by Beleth (see edit history)
Link to comment
Share on other sites

open order-address.tpl file located in your theme directory

remove:
 

		<p class="address_delivery select">
			<label for="id_address_delivery">{if $cart->isVirtualCart()}{l s='Choose a billing address:'}{else}{l s='Choose a delivery address:'}{/if}</label>
			<select name="id_address_delivery" id="id_address_delivery" class="address_select" onchange="updateAddressesDisplay();{if $opc}updateAddressSelection();{/if}">

			{foreach from=$addresses key=k item=address}
				<option value="{$address.id_address|intval}" {if $address.id_address == $cart->id_address_delivery}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'}</option>
			{/foreach}
			
			</select>
		</p>

and

		<p id="address_invoice_form" class="select" {if $cart->id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}>

		{if $addresses|@count > 1}
			<label for="id_address_invoice" class="strong">{l s='Choose a billing address:'}</label>
			<select name="id_address_invoice" id="id_address_invoice" class="address_select" onchange="updateAddressesDisplay();{if $opc}updateAddressSelection();{/if}">
			{section loop=$addresses step=-1 name=address}
				<option value="{$addresses[address].id_address|intval}" {if $addresses[address].id_address == $cart->id_address_invoice && $cart->id_address_delivery != $cart->id_address_invoice}selected="selected"{/if}>{$addresses[address].alias|escape:'htmlall':'UTF-8'}</option>
			{/section}
			</select>
			{else}
				<a style="margin-left: 221px;" href="{$link->getPageLink('address', true, NULL, "back={$back_order_page}?step=1&select_address=1{if $back}&mod={$back}{/if}")|escape:'html'}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
			{/if}
		</p>

and

		<p class="address_add submit">
			<a href="{$link->getPageLink('address', true, NULL, "back={$back_order_page}?step=1{if $back}&mod={$back}{/if}")|escape:'html'}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>
		</p>
Link to comment
Share on other sites

Thank you for the reply. I removed those parts of code but it made "your delivery address" field disapear too. Is there any way to make it stay without "your billing address" exposed?

 

P.S. When i try to move to step 4 error occurs saying that my address is incorrect.

Edited by Beleth (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
  • 4 months later...
  • 1 month later...
  • 3 years later...

Hi,

Solution for 1.6.1.24 (not tested on other versions)

I have done it after hours around it. I haven't disable the functions or change the code, i rather hidden them through CSS, so no code changes.

 

Steps:

 

Access: /themes/default-bootstrap/css (default-bootstrap is my default theme used in my store, so if your's different access the CSS folder inside)

Edit file: global.css

 

Then do a search for: address

 

The first one as in the image attached, just past this lines above the orders:

#block-order-detail .col-xs-12.col-sm-6 .address.item.box,
.order_delivery .col-xs-12.col-sm-6 .address.alternate_item{display:none}
.col-xs-12.col-sm-6 #address_invoice,
.checkbox.addressesAreEquals{visibility:hidden}

 

Then save the file on the same place, and it's done. It works for any checkout, 5steps or 1 page check out.

 

Look at the pictures so you make no mistakes.

Adresses.png

globalcss.png

Summary_order.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...