Magento Satic Top links

Posted: March 3, 2014 in PHP

<?php if (Mage::getSingleton('customer/session')->isLoggedIn()): ?>
                <div class="top-links">
                    <a class="name" href=""><?php echo $this->__('Hi,'); ?> <span><?php echo Mage::getSingleton('customer/session')->getCustomer()->getFirstname(); ?></span></a>
                    <div class="top-links-dropdown">
                            <li><a href="<?php echo $this->getUrl('customer/account/login') ?>" title="My account" ><?php echo $this->__('My account'); ?></a></li>
                            <li><a href="<?php echo $this->getUrl('sales/order/history') ?>" title="Track Order" ><?php echo $this->__('Track Order'); ?></a></li>
                            <li><a href="<?php echo $this->getUrl('customer/account/logout') ?>" title="Log Out" ><?php echo $this->__('Log Out'); ?></a></li>
            <?php else: ?>
                <ul class="links">
                    <li class="first last">
                        <a title="Log In" href="<?php echo $this->getUrl('customer/account/login') ?>"><?php echo $this->__('Log In'); ?></a>
            <?php endif; ?>

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s