当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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);
    }
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:76,代码来源:Form.php


注:本文中的Mage_Adminhtml_Block_Sales_Order_Create_Abstract::_afterToHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。