示例#1
0
 /**
  * Set link title, label and url
  */
 protected function _construct()
 {
     if (!Mage::getSingleton('Mage_Customer_Model_Session')->isLoggedIn()) {
         $this->_label = $this->__('Orders and Returns');
         $this->_title = $this->__('Orders and Returns');
         $this->_url = $this->getUrl('sales/guest/form');
         parent::_construct();
     }
 }
示例#2
0
文件: Links.php 项目: quyip8818/Mag
 /**
  * Set link title, label and url
  */
 public function __construct()
 {
     if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
         parent::__construct();
         $this->_label = $this->__('Orders and Returns');
         $this->_title = $this->__('Orders and Returns');
         $this->_url = $this->getUrl('sales/guest/form');
     }
 }
示例#3
0
 /**
  * @return string
  */
 protected function _toHtml()
 {
     $text = $this->_createLabel($this->_getItemCount());
     $this->_label = $text;
     $this->_title = $text;
     $this->_url = $this->getUrl('catalog/product_compare');
     return parent::_toHtml();
     return '';
 }
示例#4
0
 /**
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->helper('wishlist')->isAllow()) {
         $text = $this->_createLabel($this->_getItemCount());
         $this->_label = $text;
         $this->_title = $text;
         $this->_url = $this->getUrl('wishlist');
         return parent::_toHtml();
     }
     return '';
 }
示例#5
0
 /**
  * Set link title, label and url
  */
 public function __construct()
 {
     if ($this->helper('wishlist')->isAllow()) {
         $count = $this->helper('wishlist')->getItemCount();
         if ($count > 1) {
             $text = $this->__('My Wishlist (%d items)', $count);
         } else {
             if ($count == 1) {
                 $text = $this->__('My Wishlist (%d item)', $count);
             } else {
                 $text = $this->__('My Wishlist');
             }
         }
         $this->_label = $text;
         $this->_title = $text;
         $this->_url = $this->getUrl('wishlist');
         parent::__construct();
     }
 }
示例#6
0
文件: Links.php 项目: quyip8818/Mag
 /**
  * Retrieve block cache tags
  *
  * @return array
  */
 public function getCacheTags()
 {
     /** @var $wishlist Mage_Wishlist_Model_Wishlist */
     $wishlist = $this->helper('wishlist')->getWishlist();
     $this->addModelTags($wishlist);
     foreach ($wishlist->getItemCollection() as $item) {
         $this->addModelTags($item);
     }
     return parent::getCacheTags();
 }
示例#7
0
 /**
  * Set link title, label and url
  */
 public function __construct()
 {
     parent::__construct();
     $this->initLinkProperties();
 }