Public Member Functions | |
__construct () | |
getWishlist () | |
getEscapedDescription (Varien_Object $item) | |
hasDescription (Varien_Object $item) | |
getFormatedDate ($date) | |
Protected Attributes | |
$_wishlistLoaded = false |
Definition at line 35 of file Items.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 40 of file Items.php.
00041 { 00042 parent::__construct(); 00043 $this->setTemplate('wishlist/email/items.phtml'); 00044 }
getEscapedDescription | ( | Varien_Object $ | item | ) |
Definition at line 70 of file Items.php.
00071 { 00072 return nl2br($this->htmlEscape($item->getWishlistItemDescription())); 00073 }
getFormatedDate | ( | $ | date | ) |
Definition at line 80 of file Items.php.
00081 { 00082 return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); 00083 }
getWishlist | ( | ) |
Definition at line 46 of file Items.php.
00047 { 00048 if(!$this->_wishlistLoaded) { 00049 Mage::registry('wishlist') 00050 ->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer()); 00051 Mage::registry('wishlist')->getProductCollection() 00052 ->addAttributeToSelect('url_key') 00053 ->addAttributeToSelect('name') 00054 ->addAttributeToSelect('price') 00055 ->addAttributeToSelect('image') 00056 ->addAttributeToSelect('small_image') 00057 //->addAttributeToFilter('store_id', array('in'=>Mage::registry('wishlist')->getSharedStoreIds())) 00058 ->addStoreFilter(); 00059 Mage::getSingleton('catalog/product_visibility') 00060 ->addVisibleInSiteFilterToCollection(Mage::registry('wishlist')->getProductCollection()); 00061 Mage::registry('wishlist')->getProductCollection() 00062 ->load(); 00063 00064 $this->_wishlistLoaded = true; 00065 } 00066 00067 return Mage::registry('wishlist')->getProductCollection(); 00068 }
hasDescription | ( | Varien_Object $ | item | ) |