Archive for the ‘PHP’ Category

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; ?>