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">
                        <ul>
                            <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>
                        </ul>
                    </div>
                </div>
            <?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>
                    </li>
                </ul>
            <?php endif; ?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s