diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php
index 490e361c6..432669a1a 100644
--- a/controllers/front/AddressController.php
+++ b/controllers/front/AddressController.php
@@ -237,7 +237,7 @@ class AddressControllerCore extends FrontController
else // Update cart address
$this->context->cart->autosetProductAddress();
- if (Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE'))
+ if ((bool)(Tools::getValue('select_address', false)) == true OR Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE'))
{
$this->context->cart->id_address_invoice = (int)$address->id;
$this->context->cart->update();
diff --git a/themes/default/address.tpl b/themes/default/address.tpl
index 1457760c1..7c33539ef 100644
--- a/themes/default/address.tpl
+++ b/themes/default/address.tpl
@@ -218,7 +218,7 @@ $(function(){ldelim}
{l s='Please assign an address title for future reference.'} *
-
+
diff --git a/themes/default/shopping-cart.tpl b/themes/default/shopping-cart.tpl
index e8ab9d46c..16fc04b4d 100644
--- a/themes/default/shopping-cart.tpl
+++ b/themes/default/shopping-cart.tpl
@@ -365,32 +365,32 @@
{if ((!empty($delivery_option) AND !isset($virtualCart)) OR $delivery->id OR $invoice->id) AND !$opc}
{if !isset($formattedAddresses) || (count($formattedAddresses.invoice) == 0 && count($formattedAddresses.delivery) == 0) || (count($formattedAddresses.invoice.formated) == 0 && count($formattedAddresses.delivery.formated) == 0)}
- {if $delivery->id}
-
- {l s='Delivery address'} ({$delivery->alias})
- {if $delivery->company}{$delivery->company|escape:'htmlall':'UTF-8'} {/if}
- {$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}
- {$delivery->address1|escape:'htmlall':'UTF-8'}
- {if $delivery->address2}{$delivery->address2|escape:'htmlall':'UTF-8'} {/if}
- {$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}
- {$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}
-
- {/if}
- {if $invoice->id}
-
- {l s='Invoice address'} ({$invoice->alias})
- {if $invoice->company}{$invoice->company|escape:'htmlall':'UTF-8'} {/if}
- {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}
- {$invoice->address1|escape:'htmlall':'UTF-8'}
- {if $invoice->address2}{$invoice->address2|escape:'htmlall':'UTF-8'} {/if}
- {$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}
- {$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}
-
- {/if}
+ {if $delivery->id}
+
+ {l s='Delivery address'} ({$delivery->alias})
+ {if $delivery->company}{$delivery->company|escape:'htmlall':'UTF-8'} {/if}
+ {$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}
+ {$delivery->address1|escape:'htmlall':'UTF-8'}
+ {if $delivery->address2}{$delivery->address2|escape:'htmlall':'UTF-8'} {/if}
+ {$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}
+ {$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}
+
+ {/if}
+ {if $invoice->id}
+
+ {l s='Invoice address'} ({$invoice->alias})
+ {if $invoice->company}{$invoice->company|escape:'htmlall':'UTF-8'} {/if}
+ {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}
+ {$invoice->address1|escape:'htmlall':'UTF-8'}
+ {if $invoice->address2}{$invoice->address2|escape:'htmlall':'UTF-8'} {/if}
+ {$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}
+ {$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}
+
+ {/if}
{else}
{foreach from=$formattedAddresses key=k item=address}
- {if $k eq 'invoice'}{l s='Invoice address'}{elseif $k eq 'delivery'}{l s='Delivery address'}{/if} ({$address.object.alias})
+ {if $k eq 'invoice'}{l s='Invoice address'}{elseif $k eq 'delivery' && $delivery->id}{l s='Delivery address'}{/if}{if isset($address.object.alias)} ({$address.object.alias}) {/if}
{foreach $address.ordered as $pattern}
{assign var=addressKey value=" "|explode:$pattern}
@@ -405,7 +405,7 @@
{/foreach}
{/foreach}
-
+
{/if}
{/if}