Jump to content

How to remove invoice address


icemoist

Recommended Posts

  • 1 year later...

In order-address.tpl comment this:

 

{*

 

<p class="checkbox" {if $cart->isVirtualCart()}style="display:none;"{/if}>

<input type="checkbox" name="same" id="addressesAreEquals" value="1" onclick="updateAddressesDisplay();{if $opc}updateAddressSelection();{/if}" {if $cart->id_address_invoice == $cart->id_address_delivery || $addresses|@count == 1}checked="checked"{/if} />

<label for="addressesAreEquals">{l s='Use the same address for billing.'}</label>

</p>

 

<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.php', true)}?back={$back_order_page}?step=1&select_address=1{if $back}&mod={$back}{/if}" title="{l s='Add'}" class="button_large">{l s='Add a new address'}</a>

{/if}

 

*}

 

 

 

and this:

 

 

{* <ul class="address alternate_item {if $cart->isVirtualCart()}full_width{/if}" id="address_invoice"> *}

 

 

 

 

In order-detail.tpl comment this:

 

 

{*

 

<ul class="address alternate_item {if $order->isVirtual()}full_width{/if}">

<li class="address_title">{l s='Delivery'}</li>

{foreach from=$dlv_adr_fields name=dlv_loop item=field_item}

{if $field_item eq "company" && isset($address_delivery->company)}<li class="address_company">{$address_delivery->company|escape:'htmlall':'UTF-8'}</li>

{elseif $field_item eq "address2" && $address_delivery->address2}<li class="address_address2">{$address_delivery->address2|escape:'htmlall':'UTF-8'}</li>

{elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<li class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</li>

{else}

{assign var=address_words value=" "|explode:$field_item}

<li>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>

{/if}

{/foreach}

</ul>

 

 

}*

 

 

 

In order-opc-new-account.tpl comment:

 

 

{*

<p class="checkbox is_customer_param">

<input type="checkbox" name="invoice_address" id="invoice_address" />

<label for="invoice_address"><b>{l s='Please use another address for invoice'}</b></label>

</p>

 

 

*}

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

What emagiero said. But with the following adjustments:

 

In order-address.tpl add this (just before the first part you commented out here):

 

<input type="hidden" name="same" id="addressesAreEquals" value="1"/>

 

otherwise you will not be able to continue to the next step after selecting your address

 

 

In shopping-cart.tpl comment this:

 

{*

{if $invoice->id}

<ul id="invoice_address" class="address alternate_item">

<li class="address_title">{l s='Invoice address'}</li>

{if $invoice->company}<li class="address_company">{$invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}

<li class="address_name">{$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}</li>

<li class="address_address1">{$invoice->address1|escape:'htmlall':'UTF-8'}</li>

{if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}

<li class="address_city">{$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}</li>

<li class="address_country">{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}</li>

</ul>

{/if}

*}

 

Otherwise your invoice address will be shown in the shoppingcart if you return to the shopping cart after selecting an address

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
  • 1 year later...

HI

 

I have followed all these steps and it has all worked. However if you go to your basket the invoice address is still shown. Any ideas? It is not their during checkout, just in the basket.

 

Any help would be great.

Thanks

Link to comment
Share on other sites

  • 1 month later...

Hi Kevinab,

in the file shopping-cart.tpl

To remove invoce address from the basket .

                after the line :

{foreach from=$formattedAddresses key=k item=address}

add the following lline:

                    {if $k neq 'invoice' } end before the loop ends close the if

 

the code will be like this:

 

  {foreach from=$formattedAddresses key=k item=address}
                    {if $k neq 'invoice' }
                    <div class="col-xs-12 col-sm-6"{if $k == 'delivery' && !$have_non_virtual_products} style="display: none;"{/if}>
                        <ul class="address {if $address@last}last_item{elseif $address@first}first_item{/if} {if $address@index % 2}alternate_item{else}item{/if} box">
                            <li>
                                <h3 class="page-subheading">
                                    {if $k eq 'invoice'}
                                        {l s='Invoice address'}
                                    {elseif $k eq 'delivery' && $delivery->id}
                                        {l s='Delivery address'}
                                    {/if}
                                    {if isset($address.object.alias)}
                                        <span class="address_alias">({$address.object.alias})</span>
                                    {/if}
                                </h3>
                            </li>
                            {foreach $address.ordered as $pattern}
                                {assign var=addressKey value=" "|explode:$pattern}
                                {assign var=addedli value=false}
                                {foreach from=$addressKey item=key name=foo}
                                {$key_str = $key|regex_replace:AddressFormat::_CLEANING_REGEX_:""}
                                    {if isset($address.formated[$key_str]) && !empty($address.formated[$key_str])}
                                        {if (!$addedli)}
                                            {$addedli = true}
                                            <li><span class="{if isset($addresses_style[$key_str])}{$addresses_style[$key_str]}{/if}">
                                        {/if}
                                        {$address.formated[$key_str]|escape:'html':'UTF-8'}
                                    {/if}
                                    {if ($smarty.foreach.foo.last && $addedli)}
                                        </span></li>
                                    {/if}
                                {/foreach}
                            {/foreach}
                        </ul>
                    </div>
                    {/if}

 

 

Regards

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

  • 1 year later...

And what do you think about this CSS code :

#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}
  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...
On 7/8/2016 at 10:09 PM, AlainR said:

And what do you think about this CSS code :


#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}

where does this go - what does it do?

Link to comment
Share on other sites

  • 1 year later...

Does anybody know how to  hide everything about invoice address during checkout in PS 1.7.4.2    (classic theme) ? 

I have already deleted invoice address from all other places, but it must be  something  done with themes/classic/templates/checkout/_partials/steps/addresses.tpl and I do something wrong... 

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...