Mage_Wishlist_Block_Share_Wishlist Class Reference

Inheritance diagram for Mage_Wishlist_Block_Share_Wishlist:

Mage_Catalog_Block_Product_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getWishlist ()
 getWishlistCustomer ()
 getEscapedDescription ($item)
 getHeader ()
 getFormatedDate ($date)
 isSaleable ()

Protected Member Functions

 _prepareLayout ()

Protected Attributes

 $_collection = null
 $_customer = null


Detailed Description

Definition at line 35 of file Wishlist.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 41 of file Wishlist.php.

00042     {
00043         if ($headBlock = $this->getLayout()->getBlock('head')) {
00044             $headBlock->setTitle($this->getHeader());
00045         }
00046     }

getEscapedDescription ( item  ) 

Definition at line 81 of file Wishlist.php.

00082     {
00083         if ($item->getWishlistItemDescription()) {
00084             return $this->htmlEscape($item->getWishlistItemDescription());
00085         }
00086         return ' ';
00087     }

getFormatedDate ( date  ) 

Definition at line 94 of file Wishlist.php.

00095     {
00096         return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
00097     }

getHeader (  ) 

Definition at line 89 of file Wishlist.php.

00090     {
00091         return Mage::helper('wishlist')->__("%s's Wishlist", $this->htmlEscape($this->getWishlistCustomer()->getFirstname()));
00092     }

getWishlist (  ) 

Definition at line 48 of file Wishlist.php.

00049     {
00050         if(is_null($this->_collection)) {
00051             $this->_collection = Mage::registry('shared_wishlist')->getProductCollection()
00052                 ->addAttributeToSelect('name')
00053                 ->addAttributeToSelect('price')
00054                 ->addAttributeToSelect('special_price')
00055                 ->addAttributeToSelect('special_from_date')
00056                 ->addAttributeToSelect('special_to_date')
00057                 ->addAttributeToSelect('image')
00058                 ->addAttributeToSelect('small_image')
00059                 ->addAttributeToSelect('thumbnail')
00060                 //->addAttributeToFilter('store_id', array('in'=>Mage::registry('shared_wishlist')->getSharedStoreIds()))
00061                 ->addStoreFilter();
00062 
00063             Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_collection);
00064             Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_collection);
00065         }
00066         return $this->_collection;
00067     }

getWishlistCustomer (  ) 

Definition at line 69 of file Wishlist.php.

00070     {
00071         if(is_null($this->_customer)) {
00072             $this->_customer = Mage::getModel('customer/customer')
00073                 ->load(Mage::registry('shared_wishlist')->getCustomerId());
00074 
00075         }
00076 
00077         return $this->_customer;
00078     }

isSaleable (  ) 

Definition at line 99 of file Wishlist.php.

00100     {
00101         foreach ($this->getWishlist() as $item) {
00102             if ($item->isSaleable()) {
00103                 return true;
00104             }
00105         }
00106 
00107         return false;
00108     }


Member Data Documentation

$_collection = null [protected]

Definition at line 38 of file Wishlist.php.

$_customer = null [protected]

Definition at line 39 of file Wishlist.php.


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

Generated on Sat Jul 4 17:24:56 2009 for Magento by  doxygen 1.5.8