Mage_Wishlist_Block_Customer_Wishlist Class Reference

Inheritance diagram for Mage_Wishlist_Block_Customer_Wishlist:

Mage_Catalog_Block_Product_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getWishlist ()
 getEscapedDescription (Varien_Object $item)
 getFormatedDate ($date)
 getItemAddToCartUrl ($item)
 getItemRemoveUrl ($item)
 getBackUrl ()
 isSaleable ()

Protected Member Functions

 _prepareLayout ()

Protected Attributes

 $_wishlistLoaded = false


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 40 of file Wishlist.php.

00041     {
00042         if ($headBlock = $this->getLayout()->getBlock('head')) {
00043             $headBlock->setTitle($this->__('My Wishlist'));
00044         }
00045     }

getBackUrl (  ) 

Definition at line 87 of file Wishlist.php.

00088     {
00089         if ($this->getRefererUrl()) {
00090             return $this->getRefererUrl();
00091         }
00092         return $this->getUrl('customer/account/');
00093     }

getEscapedDescription ( Varien_Object item  ) 

Definition at line 67 of file Wishlist.php.

00068     {
00069         return $this->htmlEscape($item->getWishlistItemDescription());
00070     }

getFormatedDate ( date  ) 

Definition at line 72 of file Wishlist.php.

00073     {
00074         return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
00075     }

getItemAddToCartUrl ( item  ) 

Definition at line 77 of file Wishlist.php.

00078     {
00079         return $this->getUrl('*/*/cart',array('item'=>$item->getWishlistItemId()));
00080     }

getItemRemoveUrl ( item  ) 

Definition at line 82 of file Wishlist.php.

00083     {
00084         return $this->getUrl('*/*/remove',array('item'=>$item->getWishlistItemId()));
00085     }

getWishlist (  ) 

Definition at line 47 of file Wishlist.php.

00048     {
00049         if(!$this->_wishlistLoaded) {
00050             Mage::registry('wishlist')
00051                 ->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer());
00052 
00053             $collection = Mage::registry('wishlist')->getProductCollection()
00054                 ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
00055                 //->addAttributeToFilter('store_id', array('in'=>Mage::registry('wishlist')->getSharedStoreIds()))
00056                 ->addStoreFilter();
00057 
00058             Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
00059             Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($collection);
00060 
00061             $this->_wishlistLoaded = true;
00062         }
00063 
00064         return Mage::registry('wishlist')->getProductCollection();
00065     }

isSaleable (  ) 

Definition at line 95 of file Wishlist.php.

00096     {
00097         foreach ($this->getWishlist() as $item) {
00098             if ($item->isSaleable()) {
00099                 return true;
00100             }
00101         }
00102 
00103         return false;
00104     }


Member Data Documentation

$_wishlistLoaded = false [protected]

Definition at line 38 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