Public Member Functions | |
getWishlist () | |
getEscapedDescription (Varien_Object $item) | |
getFormatedDate ($date) | |
getItemAddToCartUrl ($item) | |
getItemRemoveUrl ($item) | |
getBackUrl () | |
isSaleable () | |
Protected Member Functions | |
_prepareLayout () | |
Protected Attributes | |
$_wishlistLoaded = false |
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 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 | ) |
getItemRemoveUrl | ( | $ | item | ) |
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 }
$_wishlistLoaded = false [protected] |
Definition at line 38 of file Wishlist.php.