Public Member Functions | |
getProduct () | |
getSelectionQtyTitlePrice ($_selection, $includeContainer=true) | |
getSelectionTitlePrice ($_selection, $includeContainer=true) | |
setValidationContainer ($elementId, $containerId) | |
formatPriceString ($price, $includeContainer=true) |
Definition at line 35 of file Option.php.
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() . ' ' . ($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 }