ie下innerHTML 不起作用的时候用的修复

参考来自 http://www.jonefox.com/blog/2009/05/21/internet-explorer-and-the-innerhtml-property/

代码

function replace_html(el, html) {
	if( el ) {
                var oldEl = (typeof el === "string" ? document.getElementById(el) : el);
                var newEl = document.createElement(oldEl.nodeName);

                // Preserve any properties we care about (id and class in this example)
                newEl.id = oldEl.id;
                newEl.className = oldEl.className;

                //set the new HTML and insert back into the DOM
                newEl.innerHTML = html;
                if(oldEl.parentNode)
        	        oldEl.parentNode.replaceChild(newEl, oldEl);
                else
		        oldEl.innerHTML = html;

                //return a reference to the new element in case we need it
                return newEl;
	}
};

参考用法

replace_html(“div_id”,”<div>here is html data<div>”);

ecshop 对采用指定支付方式(alipay,tenpay)增加积分的修改

进入后台 SQL查询

INSERT INTO `你的前缀_shop_config` (`parent_id`, `code`, `type`, `store_range`, `store_dir`, `value`, `sort_order` ) VALUES   ( ‘2’, ‘onlinepay_points’, ‘text’, ”, ”, ‘100’, ‘1’);

在后台 商店设置->基本设置->会出现 onlinepay_points 为100的项目

respond.php  修改如下

$payment = new $pay_code();
$pay_result = $payment->respond();
$msg     = $pay_result ? $_LANG[‘pay_success’] : $_LANG[‘pay_fail’];
if($pay_result){
if($pay_code == “alipay” || $pay_code == “tenpay” || $pay_code == “chinabank” ){
log_account_change($_SESSION[‘

user_id’], 0, 0, $GLOBALS[‘_CFG’][‘onlinepay_points’], $GLOBALS[‘_CFG’][‘onlinepay_points’],”会员在线支付送”.$GLOBALS[‘_CFG’][‘onlinepay_points’].”积分”);
}
}