Wednesday 6 August 2014

hi every one ... i think this may help for any one looking for address book in magento as in dell site....it worked for me. plz comment if any error remove book.phtml code and add the following in \htdocs\URAppName\app\design\frontend\base\default\template\customer\address\book.phtml

<<<<CODE>>>

<?php
/**
agento *
*
M * NOTICE OF LICENSE
*
This source file is subject to the Academic Free License (AFL 3.0) *
* that is bundled with this package in the file LICENSE_AFL.txt.
* http://opensource.org/licenses/afl-3.0.php * If you did not
* It is also available through the world-wide-web at this URL: receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email
add to this file if you wish to upgrade Magento to newer * versions in
* to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category design
l-3.0.php Academic Free Lic
* @package base_default * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/a fense (AFL 3.0) */ ?> <?php /** * Temlate for Mage_Customer_Block_Address_Book block * @var $test Mage_Customer_Block_Address_Book */ ?> <div class="page-title title-buttons">
o $this->getAddAddressUrl() ?>';"><span><span><?php
<h1><?php echo $this->__('Address Book') ?></h1> <button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="window.location='<?php ec hecho $this->__('Add New Address') ?></span></span></button> </div> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <div class="col2-set addresses-list"> <div class="col-1 addresses-primary">
checkout and to receive mail from E-commerce. For E-comme
<h2><?php echo $this->__('Default Addresses') ?></h2> <ol> <li class="item"> <h3><?php echo $this->__('My Contact Address') ?></h3><p>Manage your shipping and billing addresses to speed up rce Financial Services billing address updates, please visit <a href='www.unisoftinfotech.com'>Unisoft</a></p> <?php if($session=Mage::getSingleton('customer/session')->isLoggedIn()) {
{ $data = $address->toArray(); echo '<pre>';
$customerData = Mage::getSingleton('customer/session')->getCustomer(); } $customer = $customerData; $data = array(); foreach ($customer->getAddresses() as $address) $_address_id_=$data['entity_id']; echo $customer->getName();?><br/><?php //$myString = implode( '<br/>', $data); echo $data['street'];?><br/><?php echo $data['city'];?>,<?php
Mage::getSingleton('customer/session')->
echo $data['region'];?>,<?php echo $data['postcode'];?>,<br/>T:<?php echo $data['telephone'];?><?php echo '</pre>'; break; } ?> </li> <?php if($_pAddsses = getCustomer()->getDefaultBilling()): ?> <li class="item"> <h3><?php echo $this->__('Default Billing Address') ?></h3> <address>
<p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)
<?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> </address> ) ?>"><?php echo $this->__('Change Billing Address') ?></a></p> </li> <?php else: ?> <li class="item"> <h3><?php echo $this->__('Default Billing Address') ?></h3> <?php echo $this->__('You have no default billing address in your address book.') ?>
echo $this->getAd
</li> <?php endif ?> <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?> <li class="item"> <h3><?php echo $this->__('Default Shipping Address') ?></h3> <address> <?php dressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> </address>
dressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?></a></p> </li> <?php else: ?> <li class="item empty"> <h3><?php echo $this->__('Defa
<p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getA dult Shipping Address') ?></h3> <p><?php echo $this->__('You have no default shipping address in your address book.') ?></p> </li> <?php endif ?> </ol> </div> <div class="col-2 addresses-additional"> <h2><?php echo $this->__('Additional Address Entries') ?></h2>
ddressHtml($
<ol> <?php if($_pAddsses = $this->getAdditionalAddresses()): ?> <?php foreach($_pAddsses as $_address): ?> <li class="item"> <address> <?php $data_2 = $_address->toArray(); $_address_id_2=$data_2['entity_id']; echo $this->get A_address) ?> <?php if($_address_id_ == $_address_id_2):?>
', array('id'=>$_address->getId())) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator"></span> <a href="#" class="link-remove" onclick="return deleteAddress('<?php echo $_address->getId() ?>');"><?php echo $this->__('') ?></a></p> <?php else: ?> <p><a href="<?php echo $this->getUrl('c
<p><a href="<?php echo $this->getUrl('customer/address/edi tustomer/address/edit', array('id'=>$_address->getId())) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span> <a href="#" class="link-remove" onclick="return deleteAddress('<?php echo $_address->getId() ?>');"><?php echo $this->__('Delete Address') ?></a></p> <?php endif ?> </address> </li> <?php endforeach; ?> <?php else: ?>
a></p> </div> <script type="text/ja
<li class="item empty"> <p><?php echo $this->__('You have no additional address entries in your address book.') ?></p> </li> <?php endif ?> </ol> </div> </div> <div class="buttons-set"> <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?>< /vascript"> //<![CDATA[ function deleteAddress(addressId) { if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) { window.location='<?php echo $this->getDeleteUrl() ?>id/'+addressId; } return false; } //]]>
</script>
<<<<END>>>