我被委派了一项任务,将一些自定义字段添加到Magento(1.4社区)结帐页面。在那里我应该添加以下表单输入:
<div id="newoption">
<h4>Would you also like to have this option? (it costs you an extra $2.00)</h4>
<input type="checkbox" name="newoption" value="[current order id goes here]"> Yes please.<br/>
Please select the type you want: <select name="newoption_type">[options for type go here]</select><br/>
Please enter your phone <input type="text" name="newoption_phone"/>
</div>
然后我需要检查是否设置了newoption(复选框),如果是,则提取值为订单ID并将以下信息存储到表中:
表:newoption,columns:
$_GET['newoption']
或$_POST['newoption']
现在,我的问题是我应该做些什么?