<?php echo $this->getAddressesHtmlSelect('shipping') ?>
Step 2 : Now replplace our custom code inside "li"
<?php $customerId = Mage::getSingleton('customer/session')->getCustomer();?> <?php $customer = Mage::getModel('customer/customer')->load($customerId->getId()); ?> <?php $data = array();?> <?php $i=0; foreach ($customer->getAddresses() as $address):?> <?php $data = $address->toArray();?><?php $i++; endforeach; ?>
';?> <?php echo $data['street'].'
';?> <?php echo $data['city'].','.$data['region'].','.$data['postcode'].'
';?> <?php $country_name = Mage::app()->getLocale()->getCountryTranslation($data['country_id']);?> <?php echo $country_name.'
';?> <?php echo 'T: '.$data['telephone'];?> <?php echo $data['firstname'].' '.$data['lastname'].'
Enjoy coding!!
No comments:
Post a Comment