Mage_Checkout_Block_Cart_Item_Renderer_Configurable Class Reference

Inheritance diagram for Mage_Checkout_Block_Cart_Item_Renderer_Configurable:

Mage_Checkout_Block_Cart_Item_Renderer Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getConfigurableProduct ()
 getChildProduct ()
 getProductThumbnail ()
 getProductName ()
 getProductUrl ()
 getProductAttributes ()
 getOptionList ()

Public Attributes

const CONFIGURABLE_PRODUCT_IMAGE = 'checkout/cart/configurable_product_image'
const USE_PARENT_IMAGE = 'parent'


Detailed Description

Definition at line 34 of file Configurable.php.


Member Function Documentation

getChildProduct (  ) 

Get item configurable child product

Returns:
Mage_Catalog_Model_Product

Definition at line 57 of file Configurable.php.

00058     {
00059         if ($option = $this->getItem()->getOptionByCode('simple_product')) {
00060             return $option->getProduct();
00061         }
00062         return $this->getProduct();
00063     }

getConfigurableProduct (  ) 

Get item configurable product

Returns:
Mage_Catalog_Model_Product

Definition at line 44 of file Configurable.php.

00045     {
00046         if ($option = $this->getItem()->getOptionByCode('product_type')) {
00047             return $option->getProduct();
00048         }
00049         return $this->getProduct();
00050     }

getOptionList (  ) 

Get list of all otions for product

Returns:
array

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 118 of file Configurable.php.

00119     {
00120         $options = array_merge($this->getProductAttributes(), $this->getProductOptions());
00121         return $options;
00122     }

getProductAttributes (  ) 

Get selected for configurable product attributes

Returns:
array

Definition at line 106 of file Configurable.php.

00107     {
00108         $attributes = $this->getProduct()->getTypeInstance(true)
00109             ->getSelectedAttributesInfo($this->getProduct());
00110         return $attributes;
00111     }

getProductName (  ) 

Get item product name

Returns:
string

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 86 of file Configurable.php.

00087     {
00088         return $this->getProduct()->getName();
00089     }

getProductThumbnail (  ) 

Get product thumbnail image

Returns:
Mage_Catalog_Model_Product_Image

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 70 of file Configurable.php.

00071     {
00072         $product = $this->getChildProduct();
00073         if (!$product || !$product->getData('thumbnail')
00074             || ($product->getData('thumbnail') == 'no_selection')
00075             || (Mage::getStoreConfig(self::CONFIGURABLE_PRODUCT_IMAGE) == self::USE_PARENT_IMAGE)) {
00076             $product = $this->getProduct();
00077         }
00078         return $this->helper('catalog/image')->init($product, 'thumbnail');
00079     }

getProductUrl (  ) 

Get url to item product

Returns:
string

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 96 of file Configurable.php.

00097     {
00098         return $this->getProduct()->getProductUrl();
00099     }


Member Data Documentation

const CONFIGURABLE_PRODUCT_IMAGE = 'checkout/cart/configurable_product_image'

Definition at line 36 of file Configurable.php.

const USE_PARENT_IMAGE = 'parent'

Definition at line 37 of file Configurable.php.


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

Generated on Sat Jul 4 17:23:49 2009 for Magento by  doxygen 1.5.8