Mage_ProductAlert_Block_Email_Abstract Class Reference

Inheritance diagram for Mage_ProductAlert_Block_Email_Abstract:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_ProductAlert_Block_Email_Price Mage_ProductAlert_Block_Email_Stock

List of all members.

Public Member Functions

 setStore ($store)
 getStore ()
 formatPrice ($price, $format=true, $includeContainer=true)
 reset ()
 addProduct (Mage_Catalog_Model_Product $product)
 getProducts ()

Protected Member Functions

 _getUrlParams ()

Protected Attributes

 $_products = array()
 $_store


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

_getUrlParams (  )  [protected]

Get store url params

Returns:
string

Definition at line 131 of file Abstract.php.

00132     {
00133         return array(
00134             '_store'        => $this->getStore(),
00135             '_store_to_url' => true
00136         );
00137     }

addProduct ( Mage_Catalog_Model_Product product  ) 

Add product to collection

Parameters:
Mage_Catalog_Model_Product $product

Definition at line 111 of file Abstract.php.

00112     {
00113         $this->_products[$product->getId()] = $product;
00114     }

formatPrice ( price,
format = true,
includeContainer = true 
)

Convert price from default currency to current currency

Parameters:
double $price
boolean $format Format price to currency format
boolean $includeContainer Enclose into
Returns:
double

Definition at line 92 of file Abstract.php.

00093     {
00094         return $this->getStore()->convertPrice($price, $format, $includeContainer);
00095     }

getProducts (  ) 

Retrieve product collection array

Returns:
array

Definition at line 121 of file Abstract.php.

00122     {
00123         return $this->_products;
00124     }

getStore (  ) 

Retrieve current store object

Returns:
Mage_Core_Model_Store

Definition at line 76 of file Abstract.php.

00077     {
00078         if (is_null($this->_store)) {
00079             $this->_store = Mage::app()->getStore();
00080         }
00081         return $this->_store;
00082     }

reset (  ) 

Reset product collection

Definition at line 101 of file Abstract.php.

00102     {
00103         $this->_products = array();
00104     }

setStore ( store  ) 

Set Store scope

Parameters:
int|string|Mage_Core_Model_Website|Mage_Core_Model_Store $store
Mage_ProductAlert_Block_Email_Price 

Definition at line 57 of file Abstract.php.

00058     {
00059         if ($store instanceof Mage_Core_Model_Website) {
00060             $store = $store->getDefaultStore();
00061         }
00062         if (!$store instanceof Mage_Core_Model_Store) {
00063             $store = Mage::app()->getStore($store);
00064         }
00065 
00066         $this->_store = $store;
00067 
00068         return $this;
00069     }


Member Data Documentation

$_products = array() [protected]

Definition at line 42 of file Abstract.php.

$_store [protected]

Definition at line 49 of file Abstract.php.


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

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