本文整理汇总了PHP中Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml方法的具体用法?PHP Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml怎么用?PHP Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Sales_Order_Create_Abstract
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _afterToHtml
protected function _afterToHtml($html)
{
$html = str_replace('__*__', ' <span class="required">*</span>', $html);
if (version_compare(Mage::getVersion(), '1.4.1.1', '<=')) {
$html .= '<script type="text/javascript">
AdminOrder.prototype.productGridAddSelected = function(area){
if(this.productGridShowButton) Element.show(this.productGridShowButton);
var data = {};
data["add_products"] = this.gridProducts.toJSON();
data["reset_shipping"] = 1;
this.gridProducts = $H({});
this.hideArea("search");
this.loadArea(["search", "items", "shipping_method", "totals", "giftmessage","billing_method", "form_account"], true, data);
};
AdminOrder.prototype.removeQuoteItem = function(id){
this.loadArea(["items", "shipping_method", "totals", "billing_method", "form_account"], true,
{remove_item:id, from:"quote",reset_shipping: true});
};
AdminOrder.prototype.moveQuoteItem = function(id, to){
this.loadArea(["sidebar_"+to, "items", "shipping_method", "totals", "billing_method", "form_account"], this.getAreaId("items"),
{move_item:id, to:to, reset_shipping: true});
};
AdminOrder.prototype.sidebarApplyChanges = function(){
if($(this.getAreaId("sidebar"))){
var data = {};
var elems = $(this.getAreaId("sidebar")).select("input");
for(var i=0; i<elems.length; i++){
if(elems[i].getValue()){
data[elems[i].name] = elems[i].getValue();
}
}
data.reset_shipping = true;
this.loadArea(["sidebar", "items", "shipping_method", "billing_method","totals", "giftmessage", "form_account"], true, data);
}
};
AdminOrder.prototype.itemsUpdate = function(){
var info = $("order-items_grid").select("input", "select", "textarea");
var data = {};
for(var i=0; i<info.length; i++){
if(!info[i].disabled && (info[i].type != "checkbox" || info[i].checked)) {
data[info[i].name] = info[i].getValue();
}
}
data.reset_shipping = true;
data.update_items = true;
this.orderItemChanged = false;
this.loadArea(["sidebar", "items", "shipping_method", "billing_method","totals", "giftmessage", "form_account"], true, data);
};
</script>
';
} else {
$html .= '<script type="text/javascript">
AdminOrder.prototype.prepareArea = function(area){
if(typeof(area) != "object")
{
return area;
}
area[area.size()] = "form_account";
if (this.giftMessageDataChanged) {
return area.without("giftmessage");
}
return area;
};
</script>
';
}
return parent::_afterToHtml($html);
}