Magento: Fix bug in bug in billing / shipping address edit

--- ./app/design/frontend/base/default/template/customer/address/book.phtml.org	2011-03-25 11:54:09.000000000 +0100
+++ ./app/design/frontend/base/default/template/customer/address/book.phtml	2011-03-25 12:38:08.000000000 +0100
@@ -32,7 +32,6 @@
 ?>
 
<?php echo $this->__('Address Book') ?> - __('Add New Address') ?>" class="button" onclick="window.location='<?php echo $this->getAddAddressUrl() ?>';"><?php echo $this->__('Add New Address') ?>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
@@ -56,15 +55,19 @@ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?>
  • - <?php echo $this->__('Default Shipping Address') ?> - - <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> - - getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?> + <?php echo $this->__('Default Shipping Address') ?> + <?php if($_pAddsses == Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling()): ?> + <?php echo $this->__('Default Shipping Address will use the Billing Address') ?> + getAddAddressUrl(); ?>"><?php echo $this->__('Add a new address to my address book') ?> + <?php else: ?> + + <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> + + getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?> + <?php endif ?>
  • <?php else: ?>
  • - <?php echo $this->__('Default Shipping Address') ?> <?php echo $this->__('You have no default shipping address in your address book.') ?>
  • <?php endif ?> @@ -88,6 +91,7 @@ <?php endif ?> + __('Add New Address') ?>" class="button" onclick="window.location='<?php echo $this->getAddAddressUrl() ?>';"><?php echo $this->__('Add New Address') ?>
    1
    --- ./app/design/frontend/base/default/template/customer/account/dashboard/address.phtml.org	2011-03-25 11:42:43.000000000 +0100
    +++ ./app/design/frontend/base/default/template/customer/account/dashboard/address.phtml	2011-03-25 12:40:01.000000000 +0100
    @@ -28,7 +28,6 @@
         
    @@ -40,11 +39,23 @@
    <?php echo $this->__('Default Shipping Address') ?> - - <?php echo $this->getPrimaryShippingAddressHtml() ?> - getPrimaryShippingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?> - -
    + <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?> + <?php if($_pAddsses == Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling()): ?> + <?php echo $this->__('Default Shipping Address will use the Billing Address') ?> + + + getAddressBookUrl() ?>"><?php echo $this->__('Manage Addresses') ?> + <?php else: ?> + + <?php echo $this->getPrimaryShippingAddressHtml() ?> + + + getPrimaryShippingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?> + <?php endif ?> + <?php else: ?> + <?php echo $this->__('You have no default shipping address in your address book.') ?> + <?php endif ?> +
    1

    German translation (./app/locale/de_DE/Mage_Customer.csv)
    "Default Shipping Address will use the Billing Address","Sie haben noch keine Standard Versandadresse. Die Lieferung erfolgt an die Rechnungsadresse."
    "Add a new address to my address book","Neue Versandadresse hinzufügen"

    Links
    http://www.magentocommerce.com/boards/viewthread/7520/