Public Member Functions | |
getLinksPurchasedSeparately () | |
getLinkSelectionRequired () | |
hasLinks () | |
getLinks () | |
getFormattedLinkPrice ($link) | |
getJsonConfig () | |
getLinkSamlpeUrl ($link) | |
getLinksTitle () | |
getIsOpenInNewWindow () |
Definition at line 34 of file Links.php.
getFormattedLinkPrice | ( | $ | link | ) |
Enter description here...
Mage_Downloadable_Model_Link | $link |
Definition at line 85 of file Links.php.
00086 { 00087 $price = $link->getPrice(); 00088 00089 if (0 == $price) { 00090 return ''; 00091 } 00092 00093 $_priceInclTax = Mage::helper('tax')->getPrice($link->getProduct(), $price, true); 00094 $_priceExclTax = Mage::helper('tax')->getPrice($link->getProduct(), $price); 00095 00096 $priceStr = '<span class="price-notice">+'; 00097 if (Mage::helper('tax')->displayPriceIncludingTax()) { 00098 $priceStr .= $this->helper('core')->currency($_priceInclTax, true, true); 00099 } elseif (Mage::helper('tax')->displayPriceExcludingTax()) { 00100 $priceStr .= $this->helper('core')->currency($_priceExclTax, true, true); 00101 } elseif (Mage::helper('tax')->displayBothPrices()) { 00102 $priceStr .= $this->helper('core')->currency($_priceExclTax, true, true); 00103 if ($_priceInclTax != $_priceExclTax) { 00104 $priceStr .= ' (+'.$this->helper('core') 00105 ->currency($_priceInclTax, true, true).' '.$this->__('Incl. Tax').')'; 00106 } 00107 } 00108 $priceStr .= '</span>'; 00109 00110 return $priceStr; 00111 }
getIsOpenInNewWindow | ( | ) |
Return true if target of link new window
Definition at line 152 of file Links.php.
00153 { 00154 return Mage::getStoreConfigFlag(Mage_Downloadable_Model_Link::XML_PATH_TARGET_NEW_WINDOW); 00155 }
getJsonConfig | ( | ) |
Enter description here...
Definition at line 118 of file Links.php.
00119 { 00120 $config = array(); 00121 00122 foreach ($this->getLinks() as $link) { 00123 $config[$link->getId()] = Mage::helper('core')->currency($link->getPrice(), false, false); 00124 } 00125 00126 return Zend_Json::encode($config); 00127 }
getLinks | ( | ) |
Enter description here...
Definition at line 73 of file Links.php.
00074 { 00075 return $this->getProduct()->getTypeInstance(true) 00076 ->getLinks($this->getProduct()); 00077 }
getLinkSamlpeUrl | ( | $ | link | ) |
getLinkSelectionRequired | ( | ) |
Enter description here...
Definition at line 51 of file Links.php.
00052 { 00053 return $this->getProduct()->getTypeInstance(true) 00054 ->getLinkSelectionRequired($this->getProduct()); 00055 }
getLinksPurchasedSeparately | ( | ) |
Enter description here...
Definition at line 41 of file Links.php.
00042 { 00043 return $this->getProduct()->getLinksPurchasedSeparately(); 00044 }
getLinksTitle | ( | ) |
Return title of links section
Definition at line 139 of file Links.php.
00140 { 00141 if ($this->getProduct()->getLinksTitle()) { 00142 return $this->getProduct()->getLinksTitle(); 00143 } 00144 return Mage::getStoreConfig(Mage_Downloadable_Model_Link::XML_PATH_LINKS_TITLE); 00145 }
hasLinks | ( | ) |
Enter description here...
Definition at line 62 of file Links.php.
00063 { 00064 return $this->getProduct()->getTypeInstance(true) 00065 ->hasLinks($this->getProduct()); 00066 }