Public Member Functions | |
getWishlist () | |
getWishlistCustomer () | |
getEscapedDescription ($item) | |
getHeader () | |
getFormatedDate ($date) | |
isSaleable () | |
Protected Member Functions | |
_prepareLayout () | |
Protected Attributes | |
$_collection = null | |
$_customer = null |
Definition at line 35 of file Wishlist.php.
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
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 }
$_collection = null [protected] |
Definition at line 38 of file Wishlist.php.
$_customer = null [protected] |
Definition at line 39 of file Wishlist.php.