Mage_Checkout_Block_Cart_Item_Renderer_Grouped Class Reference

Inheritance diagram for Mage_Checkout_Block_Cart_Item_Renderer_Grouped:

Mage_Checkout_Block_Cart_Item_Renderer Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getGroupedProduct ()
 getProductThumbnail ()
 getProductUrl ()

Public Attributes

const GROUPED_PRODUCT_IMAGE = 'checkout/cart/grouped_product_image'
const USE_PARENT_IMAGE = 'parent'

Protected Member Functions

 _toHtml ()


Detailed Description

Definition at line 34 of file Grouped.php.


Member Function Documentation

_toHtml (  )  [protected]

Prepare item html

This method uses renderer for real product type

Returns:
string

Reimplemented from Mage_Core_Block_Template.

Definition at line 85 of file Grouped.php.

00086     {
00087         $renderer = $this->getRenderedBlock()->getItemRenderer($this->getItem()->getRealProductType());
00088         $renderer->setItem($this->getItem());
00089         $renderer->overrideProductUrl($this->getProductUrl());
00090         $renderer->overrideProductThumbnail($this->getProductThumbnail());
00091         $rendererHtml = $renderer->toHtml();
00092         $renderer->overrideProductUrl(null);
00093         $renderer->overrideProductThumbnail(null);
00094         return $rendererHtml;
00095     }

getGroupedProduct (  ) 

Get item grouped product

Returns:
Mage_Catalog_Model_Product

Definition at line 44 of file Grouped.php.

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

getProductThumbnail (  ) 

Get product thumbnail image

Returns:
Mage_Catalog_Model_Product_Image

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 57 of file Grouped.php.

00058     {
00059         $product = $this->getProduct();
00060         if (!$product->getData('thumbnail')
00061             ||($product->getData('thumbnail') == 'no_selection')
00062             || (Mage::getStoreConfig(self::GROUPED_PRODUCT_IMAGE) == self::USE_PARENT_IMAGE)) {
00063             $product = $this->getGroupedProduct();
00064         }
00065         return $this->helper('catalog/image')->init($product, 'thumbnail');
00066     }

getProductUrl (  ) 

Get url to item product

Returns:
string

Reimplemented from Mage_Checkout_Block_Cart_Item_Renderer.

Definition at line 73 of file Grouped.php.

00074     {
00075         return $this->getGroupedProduct()->getProductUrl();
00076     }


Member Data Documentation

const GROUPED_PRODUCT_IMAGE = 'checkout/cart/grouped_product_image'

Definition at line 36 of file Grouped.php.

const USE_PARENT_IMAGE = 'parent'

Definition at line 37 of file Grouped.php.


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

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