本文整理汇总了PHP中Varien_Data_Form_Element_Text::getAfterElementHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Text::getAfterElementHtml方法的具体用法?PHP Varien_Data_Form_Element_Text::getAfterElementHtml怎么用?PHP Varien_Data_Form_Element_Text::getAfterElementHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Text
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Text::getAfterElementHtml方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAfterElementHtml
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;
}
示例2: getAfterElementHtml
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>";
}
示例3: getAfterElementHtml
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;
}
示例4: getAfterElementHtml
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;
}
示例5: getAfterElementHtml
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;
}
示例6: getAfterElementHtml
public function getAfterElementHtml()
{
$html = parent::getAfterElementHtml();
return $html . " <script>\$('" . $this->getHtmlId() . "').disable();</script>";
}
示例7: getAfterElementHtml
public function getAfterElementHtml()
{
$html = parent::getAfterElementHtml();
return $html . " <script>\n \t\t\t\t\$('" . $this->getHtmlId() . "').hide();\n \t\t\t\t</script>";
}
示例8: getAfterElementHtml
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 ";
}