Mage_Checkout_Block_Links Class Reference

Inheritance diagram for Mage_Checkout_Block_Links:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 addCartLink ()
 addCheckoutLink ()


Detailed Description

Definition at line 34 of file Links.php.


Member Function Documentation

addCartLink (  ) 

Add shopping cart link to parent block

Returns:
Mage_Checkout_Block_Links

Definition at line 42 of file Links.php.

00043     {
00044         if ($parentBlock = $this->getParentBlock()) {
00045             $count = $this->helper('checkout/cart')->getSummaryCount();
00046 
00047             if( $count == 1 ) {
00048                 $text = $this->__('My Cart (%s item)', $count);
00049             } elseif( $count > 0 ) {
00050                 $text = $this->__('My Cart (%s items)', $count);
00051             } else {
00052                 $text = $this->__('My Cart');
00053             }
00054 
00055             $parentBlock->addLink($text, 'checkout/cart', $text, true, array(), 50, null, 'class="top-link-cart"');
00056         }
00057         return $this;
00058     }

addCheckoutLink (  ) 

Add link on checkout page to parent block

Returns:
Mage_Checkout_Block_Links

Definition at line 65 of file Links.php.

00066     {
00067         if (!$this->helper('checkout')->canOnepageCheckout()) {
00068             return $this;
00069         }
00070         if ($parentBlock = $this->getParentBlock()) {
00071             $text = $this->__('Checkout');
00072             $parentBlock->addLink($text, 'checkout', $text, true, array(), 60, null, 'class="top-link-checkout"');
00073         }
00074         return $this;
00075     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:50 2009 for Magento by  doxygen 1.5.8