Some useful shippets for including customer account and a basic basket/cart product count in the header of Magento. This should be added to header.html in your template folder, athough the code will work anywhere in the Magento template system

<ul>
   <?php if ($this->helper('customer')->isLoggedIn() ) { ?>
      <li><a href="/customer/account/logout/">Log out</a></li>
      <!-- <li><a href="/customer/account/create/">Register</a></li> -->
   <?php } else { ?>
      <li><a href="/customer/account/login/">Sign in</a></li>
      <li><a href="/customer/account/create/">Register</a></li>
   <?php } // logged in ?>
</ul>

Simple code to dispay cart count

<ul>
<?php
   $count = $this->helper('checkout/cart')->getSummaryCount();  //get total items in cart
   $total = $this->helper('checkout/cart')->getQuote()->getGrandTotal(); //get total price
   if($count>1) {
      echo $this->__('<li><a href="/checkout/cart"><strong>Basket (%s Items)</strong></a></li>',$count);
   } else if ($count==1) {
      echo $this->__('<li><a href="/checkout/cart"><strong>Basket (1 Item)</a></li></strong>',$count);
   } else {
      echo $this->__('<li><a href="/checkout/cart"><strong>Basket (0 Items)</strong></a></li>',$count);
   }
   ?> 
</ul>

Magento

Magento is a feature-rich ecommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content and functionality of their ecommerce store.

About Magento Ecommerce · Magento Posts

Related Magento Posts

Getting Started with Magento Open Source

Magento Northern Ireland Open Source allows you to build a unique online store from the ground up. ## Standard Features Magento Open Source includes everything... November 2022 · Magento

Magento - WebP Image Format Conversion

An introduction to image optimisation in Magento Northern Ireland **[Image Optimisation](/web-image-formats)** is an increasingly important step improve page speed and search engine performance of your... September 2022 · Magento

Aheadworks switch to subscription model

Aheadworks will be removing Composer keys and download access for existing customers and switching entirely to a subscription model. From February 2022 Aheadworks announced it... March 2022 · Magento

More Magento Posts...