Public Member Functions | |
addCartLink () | |
addCheckoutLink () |
Definition at line 34 of file Links.php.
addCartLink | ( | ) |
Add shopping cart link to parent block
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
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 }