我想session['abc']
在结账时添加一个新的第 5 步:付款方式(1.5.5.1)。
到目前为止我所做的:
/template/checkout/payment_method.tpl
添加
<input type="hidden" name="abc" value="1111" id="abc">
/template/checkout/checkout.tpl
data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method textarea'),
变成
data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method textarea, #payment-method input[type=\'hidden\']'),
/controller/checkou/payment_method.php
后
$this->session->data['payment_method'] = $this->session->data['payment_methods'][$this->request->post['payment_method']];
添加
$this->session->data['abc'] = strip_tags($this->request->post['abc']);
错误信息是
SyntaxError: JSON.parse: unexpected character
OK
<b>Notice</b>: Undefined index: salutation in <b>D:\phpnow\PHPnow-1.5.6\htdocs\1\catalog\controller\checkout\payment_method.php</b> on line <b>190</b>[]