Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option Class Reference

Inheritance diagram for Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option:

Mage_Bundle_Block_Catalog_Product_Price Mage_Catalog_Block_Product_Price Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Checkbox Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Multi Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Radio Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Select

List of all members.

Public Member Functions

 getProduct ()
 getSelectionQtyTitlePrice ($_selection, $includeContainer=true)
 getSelectionTitlePrice ($_selection, $includeContainer=true)
 setValidationContainer ($elementId, $containerId)
 formatPriceString ($price, $includeContainer=true)


Detailed Description

Definition at line 35 of file Option.php.


Member Function Documentation

formatPriceString ( price,
includeContainer = true 
)

Definition at line 68 of file Option.php.

00069     {
00070         $priceTax = Mage::helper('tax')->getPrice($this->getProduct(), $price);
00071         $priceIncTax = Mage::helper('tax')->getPrice($this->getProduct(), $price, true);
00072 
00073         if (Mage::helper('tax')->displayBothPrices() && $priceTax != $priceIncTax) {
00074             $formated = Mage::helper('core')->currency($priceTax, true, $includeContainer);
00075             $formated .= ' (+'.Mage::helper('core')->currency($priceIncTax, true, $includeContainer).' '.Mage::helper('tax')->__('Incl. Tax').')';
00076         } else {
00077             $formated = $this->helper('core')->currency($priceTax, true, $includeContainer);
00078         }
00079 
00080         return $formated;
00081     }

getProduct (  ) 

Reimplemented from Mage_Catalog_Block_Product_Price.

Definition at line 37 of file Option.php.

00038     {
00039         if (!$this->hasData('product')) {
00040             $this->setData('product', Mage::registry('current_product'));
00041         }
00042         return $this->getData('product');
00043     }

getSelectionQtyTitlePrice ( _selection,
includeContainer = true 
)

Definition at line 45 of file Option.php.

00046     {
00047         $price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection);
00048         return $_selection->getSelectionQty()*1 . ' x ' . $_selection->getName() . '   ' .
00049             ($includeContainer ? '<span class="price-notice">':'') . '+' .
00050             $this->formatPriceString($price, $includeContainer) . ($includeContainer ? '</span>':'');
00051     }

getSelectionTitlePrice ( _selection,
includeContainer = true 
)

Definition at line 53 of file Option.php.

00054     {
00055         $price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection, 1);
00056         return $_selection->getName() . ' &nbsp; ' . ($includeContainer ? '<span class="price-notice">':'') . '+' .
00057             $this->formatPriceString($price, $includeContainer) . ($includeContainer ? '</span>':'');
00058     }

setValidationContainer ( elementId,
containerId 
)

Definition at line 60 of file Option.php.

00061     {
00062         return '<script type="text/javascript">
00063             $(\'' . $elementId . '\').advaiceContainer = \'' . $containerId . '\';
00064             $(\'' . $elementId . '\').callbackFunction  = \'bundle.validationCallback\';
00065             </script>';
00066     }


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

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