public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); /** * getEntityAttribute - use __call */ $addJsObserver = false; if ($attribute = $this->getEntityAttribute()) { if (!($storeId = $attribute->getStoreId())) { $storeId = $this->getForm()->getDataObject()->getStoreId(); } $store = Mage::app()->getStore($storeId); $html .= '<strong>[' . (string) $store->getBaseCurrencyCode() . ']</strong>'; if (Mage::helper('tax')->priceIncludesTax($store)) { if ($attribute->getAttributeCode() !== 'cost') { $addJsObserver = true; $html .= ' <strong>[' . Mage::helper('tax')->__('Inc. Tax') . '<span id="dynamic-tax-' . $attribute->getAttributeCode() . '"></span>]</strong>'; } } } if ($addJsObserver) { $html .= $this->_getTaxObservingCode($attribute); } return $html; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); $html .= '<style> .type_link:hover { text-decoration: underline; cursor: pointer; } </style>'; $html .= '<div id="type_product" style="position: absolute; z-index: 99; background-color: #ffffff" ></div>'; return $html . " <script>\n\n var typeloader;\n \$('" . $this->getHtmlId() . "').observe('keyup', function(event){\n clearTimeout(typeloader);\n typeloader = setTimeout(function(){ respondToClick(event); }, 750);\n });\n\n function setIdValue(el) {\n\n \$('shiphawk_type_of_product').value = el.innerHTML;\n \$('shiphawk_type_of_product_value').value = el.id;\n \$('type_product').hide();\n }\n\n function respondToClick(event) {\n\n var element = event.element();\n\n var minlength = 3;\n\n var url = '" . $this->getTypeUrl() . "';\n var parameters = {\n search_tag: element.value\n };\n\n if(element.value.length >= minlength ) {\n new Ajax.Request(url, {\n method: 'post',\n parameters: parameters,\n onSuccess: function(transport) {\n \$('type_product').update(transport.responseText);\n \$('type_product').show();\n },\n onLoading:function(transport)\n {\n }\n });\n }\n }\n \t\t\t\t</script>"; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); /** * getEntityAttribute - use __call */ if ($attribute = $this->getEntityAttribute()) { $currencyCode = (string) Mage::app()->getStore($attribute->getStoreId())->getBaseCurrencyCode(); $html .= '<strong>[' . $currencyCode . ']</strong>'; } return $html; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); /** * getEntityAttribute - use __call */ if ($attribute = $this->getEntityAttribute()) { if (!($storeId = $attribute->getStoreId())) { $storeId = $this->getForm()->getDataObject()->getStoreId(); } $store = Mage::app()->getStore($storeId); $html .= '<strong>[' . (string) $store->getBaseCurrencyCode() . ']</strong>'; } return $html; }
public function getAfterElementHtml() { $html = Varien_Data_Form_Element_Text::getAfterElementHtml(); $addJsObserver = false; if ($attribute = $this->getEntityAttribute()) { $store = $this->getStore(); $html .= '<strong>[' . (string) $store->getBaseCurrencyCode() . ']</strong>'; if (Mage::helper('tax')->priceIncludesTax($store)) { if ($attribute->getAttributeCode() !== 'cost') { $addJsObserver = true; $html .= ' <strong>[' . Mage::helper('tax')->__('Inc. Tax') . '<span id="' . $this->getTaxObservingSpanId() . '"></span>]</strong>'; } } } if ($addJsObserver) { $html .= $this->_getTaxObservingCode($attribute); } return $html; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); return $html . " <script>\$('" . $this->getHtmlId() . "').disable();</script>"; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); return $html . " <script>\n \t\t\t\t\$('" . $this->getHtmlId() . "').hide();\n \t\t\t\t</script>"; }
public function getAfterElementHtml() { $html = parent::getAfterElementHtml(); return $html . "\r\n <script>\r\n (function(){\r\n var oAddtitionalPrices = \$('" . $this->getHtmlId() . "');\r\n var price = \$('price');\r\n function checkStatus()\r\n {\r\n if((+price.value) > 0)\r\n {\r\n oAddtitionalPrices.disable().setStyle({\r\n background: '#E6E6E6'\r\n });\r\n }\r\n else\r\n {\r\n oAddtitionalPrices.enable().setStyle({\r\n background: 'white'\r\n });\r\n }\r\n }\r\n\r\n (function init()\r\n {\r\n checkStatus();\r\n price.observe('blur',function(e){\r\n checkStatus();\r\n });\r\n })();\r\n\r\n\r\n })();\r\n </script>\r\n "; }